CORS trapping me

Evening all

PSU 4.1.0 running in a docker container on my linux VM, here on for testing, all great with powershell calling APIs etc. I’ve a static website in Azure storage blob, a simple index.html, and have allowed the name (as matches Origin when I capture the web traffic in dev tools) to CorsHosts as below:

root@2d0c2c124d77:/home/Universal# grep -i cors appsettings*
appsettings.desktop.json:  "CorsHosts": "",
appsettings.Development.json:  "CorsHosts": "",
appsettings.json:  "CorsHosts": "",

But… still a CORS error. What am I doing wrong here?

Also, I presume I should only be using appsettings.json rather than all 3? Also tried a wildcard, but no joy. Nothing top secret here that I need to be concerned about protecting…


Do you have any other error logs?

Also, how are you authenticating? Are you able to access the resources separately without any authentication?

Regarding the appsettings.json file how are you modifying this and what with?

With my Docker containers, everything app settings related is specified as an environment variable in either my arm template or compose script depending on the platform I am using.

No authentication, this is an anonymous REST API. No error logs, except the browser development tools telling me the request was blocked because of CORS. Modifying the appsettings files within the container with VIM.

What is the exact wording of the browser development tools telling you the request was blocked because of CORS?

Are there any http status codes associated with that message?

No codes, because it’s not an HTTP error. It’s the browser doing its thing.