Open ghost opened 4 years ago
@davidmoseler
cors = CORS(resources={
r'/*': {
'origins': [
'http://localhost:3000'
]
}
})
cors.init_app(app)
According to the docs, this use-case is the simplest setup https://flask-cors.readthedocs.io/en/latest/#simple-usage
So, I am unsure I understand this issue.
After installing and applying flask CORS to the application (cors = CORS(app)), axios requests to the application still return with
"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at ((url)). (Reason: CORS preflight response did not succeed)"
after an initial OPTIONS request. There is no mention about "preflight" in the documentation and no solution to this problem can be found at any site as far as I'm aware (for example, a search for "Reason: CORS preflight response did not succeed" flask at google returns only 3 results, none of which even mention the word "preflight" or "flask".
Please, can you share a minimal configuration example such that flask just allows CORS for every url already and that's it?