Hi,
Usually, the CORS configuration must be done on the server handling the request, not on the requester.
https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-rest-api#add-cors-functionality
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I'm trying to do a very simple fetch("EXTERNAL_URL.",method:"POST") in my static web app and i get the following error msg :
Access to fetch at 'EXTERNAL_URL' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
I've tried adding "Access-Control-Allow-Origin": "*" in my request headers but i don't manage to get rid of the issue.
Can you please help with that ?
Thanks
Hi,
Usually, the CORS configuration must be done on the server handling the request, not on the requester.
https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-rest-api#add-cors-functionality