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
Access to XMLHttpRequest at 'http://...' from origin 'http://localhost:8000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request. #257
Comments
you probably want to @cross_origin() decorators to your routes |
I am getting the same issue. I tried using |
We are getting the same issue, any update on this, it happens randomly |
I have hit the same issue recently, and at last I found it was caused by the unmatch of request url. @app.route('/user/', methods=['GET']) but the url frontend requesting is '/user',this will cause the flask returned a 308 redirect response which is not allowed by So the conclusion is making the backend url and frontend url stricly match will solve the problem. I hope this helps. |
Thanks @HarpSun it worked for me:) |
can confirm, @HarpSun solution works! |
You can also try |
for app wide configuration of this try:
Thanks for the solution @hans2520 , that led me to this solution I found elsewhere. |
I hope more people see your response, there is several links and issues open about this problem and none of them mention this. This solve my problem. I started to get this error after migrating my api's to blueprints, and didn't notice that the path was different. Thank you. |
I'm getting the following error when using axios in redux-saga in react to post a multipart/form-data:
My Flask-CORS config is dead simple:
I see nothing in the docs referencing any non-default options to pass preflight checks for origin '*'. I'm not using cookies. What am I missing?
The text was updated successfully, but these errors were encountered: