-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override Preflight Response code #8
Comments
Seconded. If calling a server that does not support Options at all, it results in a |
As far as I know, we need to use the
Can you provide an example to test this |
The "Overwrite 4xx status code for this tab" option works, but it also breaks my code in some cases since it also overwrites 4xx status code errors for methods other than OPTIONS. So if I make a HTTP GET and the API returns a 404 because it didn't find it, that gets changed to a 200 too. For an example of a server that doesn't support OPTIONS: Azure Static Web Apps - https://azure.microsoft.com/en-us/products/app-service/static/ Since apps published in it by default access the api by a prefix instead of a different domain (ex: front-end is on www.mydomain.com, back-end is on www.mydomain.com/api/path-to-endpoint) on Azure Functions, it does not support CORS as it is not needed. But if I want my frontend running on localhost to access www.devserver.mydomain.com/api/any-endpoint (so I don't need to run a local backend), the calls would fail because OPTIONS www.mydomain.com/api/any-endpoint returns 404. |
Override Preflight Response code to 200 to allow certains CORS Request to pass
The text was updated successfully, but these errors were encountered: