From 1f90455ee626a990adcdfc8816ca25f3caeadbb7 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Tue, 13 Feb 2018 15:40:04 +0200 Subject: [PATCH] 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/ --- src/pylorax/api/crossdomain.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pylorax/api/crossdomain.py b/src/pylorax/api/crossdomain.py index cbeb0a44..bda8a8b4 100644 --- a/src/pylorax/api/crossdomain.py +++ b/src/pylorax/api/crossdomain.py @@ -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