Add required_methods for decorator
otherwise we can't issue OPTIONS requests to the server, see first comment at http://flask.pocoo.org/snippets/56/
This commit is contained in:
parent
7f7295e3b0
commit
1f90455ee6
@ -59,5 +59,6 @@ def crossdomain(origin, methods=None, headers=None,
|
|||||||
return resp
|
return resp
|
||||||
|
|
||||||
f.provide_automatic_options = False
|
f.provide_automatic_options = False
|
||||||
|
f.required_methods = ['OPTIONS']
|
||||||
return update_wrapper(wrapped_function, f)
|
return update_wrapper(wrapped_function, f)
|
||||||
return decorator
|
return decorator
|
||||||
|
Loading…
Reference in New Issue
Block a user