Commit eb6c6e13 authored by Manuel's avatar Manuel

Merge branch 'bugfix/cors' into develop

parents d670155e 03d5379c
...@@ -18,9 +18,11 @@ from pathlib import Path ...@@ -18,9 +18,11 @@ from pathlib import Path
from env_info import is_running_locally, get_resources_path from env_info import is_running_locally, get_resources_path
from flask import request from flask import request
from flask import redirect from flask import redirect
from flask_cors import CORS
# load swagger config # load swagger config
app = connexion.App(__name__, specification_dir='configs/') app = connexion.App(__name__, specification_dir='configs/')
CORS(app.app)
@app.app.before_request @app.app.before_request
def before_request(): def before_request():
......
...@@ -14,6 +14,7 @@ cycler==0.10.0 ...@@ -14,6 +14,7 @@ cycler==0.10.0
decorator==4.4.1 decorator==4.4.1
Deprecated==1.2.7 Deprecated==1.2.7
Flask==1.1.1 Flask==1.1.1
Flask-Cors==3.0.10
idna==2.8 idna==2.8
importlib-metadata==1.5.0 importlib-metadata==1.5.0
inflection==0.3.1 inflection==0.3.1
......
...@@ -20,6 +20,7 @@ from env_info import is_running_locally, get_resources_path ...@@ -20,6 +20,7 @@ from env_info import is_running_locally, get_resources_path
from messaging.ReconnectingMessageManager import ReconnectingMessageManager from messaging.ReconnectingMessageManager import ReconnectingMessageManager
from messaging.MessageHandler import MessageHandler from messaging.MessageHandler import MessageHandler
from flask import request from flask import request
from flask_cors import CORS
from flask import redirect from flask import redirect
# init message handler # init message handler
...@@ -30,6 +31,7 @@ def message_received_callback(channel, method, properties, body): ...@@ -30,6 +31,7 @@ def message_received_callback(channel, method, properties, body):
# load swagger config # load swagger config
app = connexion.App(__name__, specification_dir='configs/') app = connexion.App(__name__, specification_dir='configs/')
CORS(app.app)
@app.app.before_request @app.app.before_request
def before_request(): def before_request():
......
...@@ -10,6 +10,7 @@ connexion==2.7.0 ...@@ -10,6 +10,7 @@ connexion==2.7.0
coverage==5.3.1 coverage==5.3.1
cryptography==3.1 cryptography==3.1
Flask==1.1.2 Flask==1.1.2
Flask-Cors==3.0.10
idna==2.9 idna==2.9
importlib-metadata==1.6.1 importlib-metadata==1.6.1
inflection==0.5.0 inflection==0.5.0
......
...@@ -21,12 +21,14 @@ import connexion ...@@ -21,12 +21,14 @@ import connexion
from security import swagger_util from security import swagger_util
from env_info import is_running_locally, get_resources_path from env_info import is_running_locally, get_resources_path
from flask import request from flask import request
from flask_cors import CORS
from flask import redirect from flask import redirect
# start app # start app
if __name__ == '__main__': if __name__ == '__main__':
app = connexion.App(__name__, specification_dir='configs/') app = connexion.App(__name__, specification_dir='configs/')
CORS(app.app)
@app.app.before_request @app.app.before_request
def before_request(): def before_request():
......
...@@ -9,10 +9,10 @@ click==7.1.2 ...@@ -9,10 +9,10 @@ click==7.1.2
clickclick==1.2.2 clickclick==1.2.2
colorama==0.4.3 colorama==0.4.3
connexion==2.7.0 connexion==2.7.0
coverage==5.3.1
cryptography==2.9.2 cryptography==2.9.2
Deprecated==1.2.10 Deprecated==1.2.10
Flask==1.1.2 Flask==1.1.2
Flask-Cors==3.0.10
idna==2.10 idna==2.10
importlib-metadata==1.7.0 importlib-metadata==1.7.0
inflection==0.5.0 inflection==0.5.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment