Closed b3g00d closed 7 years ago
Remove methods='*'
and it will works. You must read the document more carefully
methods (list or string) –
The method or list of methods which the allowed origins are allowed to access for non-simple requests.
Default : [GET, HEAD, POST, OPTIONS, PUT, PATCH, DELETE]
Thanks @Gnouc!
Hmm, this seems like something we should make Flask-CORS catch. It would be great to validate the list of methods passed, and verify that they are valid.
Hi, I'm using lastest version of
flask-CORS
: This is my example code:Of cource I already read your lastest docs and knew
allow_headers
default is'*'
. But when I send a requestOPTIONS
like this:I don't have
Access-Control-Allow-Headers
in response. and Google-Chrome return a errorRequest header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response.
. I already change to a list, string but not working at all. NOTE: I already read this issue #145