Resolved: Fix SSL renewal issue on Gitlab Server

PROBLEM : I had hosted a gitlab server on Azure and it was not getting autorenewed. SOLUTION :  1. Check the current SSL cert path: sudo grep -n "ssl_certificate" /var/opt/gitlab/nginx/conf/gitlab-http.conf OR sudo grep -n "ssl_certificate" /etc/gitlab/gitlab.rb  You are likely to see something like this: nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.example.com.crt" nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.example.com.key"  2. In my case, I was using gitlab let'sencrypt. So, I installed certbot. sudo apt update && sudo apt install certbot -y  3. Obtain Fresh Certificate sudo gitlab-ctl stop nginx sudo certbot certonly --standalone -d gitlab.yourdomain.com sudo gitlab-ctl start nginx 4. Configure Gitlab to use new cert external_url "https://gitlab.yourdomain.com" letsencrypt['enable'] = false nginx['s...

RESOLVED: CORS issue on ionic Mobile App ios


Problem: 

I was working on a project in which I was developing an ionic application which needed to access a Website URL hosted on Azure App Service.

The app was unable to connect and was throwing CORS issue. When I debugged using xcode, I found that the request is being made by the url capacitor://localhost and when I tried adding the same in Azure App Service, this was not allowed:



Solution:

I used azure cli to add the cors url. For this:

  1. In case, you are not having azure cli, download it here:
    https://learn.microsoft.com/en-us/cli/azure/install-azure-cli
  2. Run command:
    az login
  3. Run the following command to add url: 
az webapp cors add --allowed-origins capacitor://localhost --name MyAppService --resource-group MyResourceGroup 

Happy Coding.