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:
Alexander Todorov 2018-02-13 15:40:04 +02:00 committed by Brian C. Lane
parent 7f7295e3b0
commit 1f90455ee6
1 changed files with 1 additions and 0 deletions

View File

@ -59,5 +59,6 @@ def crossdomain(origin, methods=None, headers=None,
return resp
f.provide_automatic_options = False
f.required_methods = ['OPTIONS']
return update_wrapper(wrapped_function, f)
return decorator