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: After doing some research, I found the solution here: Solution: I used azure cli to add the cors url. For this: In case, you are not having azure cli, download it here: Run command: az login Run the following command to add url:  az webapp cors add --allowed-origins capacitor://localhost --name MyAppService --resource-group MyResourceGroup Happy Coding.

Resolved: Getting 404 on refresh in angular or react application

 PROBLEM: If you are working with a single page application (SPA) say an application built with Angular or React, you may get a 404 when you hit a refresh on a specific route and you host your application on Apache Server.


Simply add a .htaccess file in the root directory of your application or website and your problem should be solved


RewriteEngine on
#RewriteCond %{HTTPS} !on

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteRule ^(.*) /index.html [NC,L]

# RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}/index.html
# RewriteRule ^([^/]+)/?$ index.html [L]
# RewriteCond %{REQUEST_URI} !^/index.html$
# RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}\.(php|html)$ /index.html [L,R=302]