-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
CORS doesn't work #4313
Comments
Okay, that's not a problem with CORS in Strapi. Closing |
This was referenced Nov 25, 2023
This was referenced May 13, 2024
This was referenced May 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I have Electron app in which I am using axios for requests. When I am getting request and it return status code 200, everything is okay, but when it returns 404, I can't read error in my app. I set CORS to
*
, but I can't see any cors headers in response headers. OPTIONS requests returns always 404 :/Steps to reproduce the behavior
*
Expected behavior
OPTIONS request should returns 204 with no-content. Any other requests should return CORS headers.
Screenshots
Postman GET response headers: https://www.dropbox.com/s/wx4php43s6eyhyr/Screenshot%202019-10-22%2008.50.10.png?dl=0
Postman OPTIONS request: https://www.dropbox.com/s/y0mj7jk038d4j4j/Screenshot%202019-10-22%2008.53.29.png?dl=0
Strapi cors setting in admin panel: https://www.dropbox.com/s/2tkt1p8xx8398qp/Screenshot%202019-10-22%2008.52.02.png?dl=0
Code snippets
System
Additional context
In axios promise even if request return 404, undefined response goes to
then
instead ofcatch
:/The text was updated successfully, but these errors were encountered: