From 53a93a948d8360aa3c5b65c9d62d9f66dee6447c Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Thu, 14 Jan 2021 17:10:26 +0100 Subject: [PATCH] corsified server --- tools/ws/server.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/ws/server.py b/tools/ws/server.py index e2a31a3..844c97c 100644 --- a/tools/ws/server.py +++ b/tools/ws/server.py @@ -1,5 +1,12 @@ import connexion +from flask_cors import CORS +# instantiate the webservice app = connexion.App(__name__) app.add_api('my_api.yaml') + +# CORSify it - otherwise Angular won't accept it +CORS(app.app) + +# provide the webservice application to uwsgi application = app.app