Commit abb6aec5 authored by Manuel's avatar Manuel

added CORS to business-logic and trace-retrieval

parent 0ba62690
...@@ -14,8 +14,10 @@ from security import swagger_util ...@@ -14,8 +14,10 @@ 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 import redirect from flask import redirect
from flask_cors import CORS
app = connexion.App(__name__, specification_dir='configs/') app = connexion.App(__name__, specification_dir='configs/')
CORS(app.app)
from db.entities.layer_adapter import LayerAdapter from db.entities.layer_adapter import LayerAdapter
......
...@@ -11,6 +11,7 @@ connexion==2.7.0 ...@@ -11,6 +11,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.10 idna==2.10
importlib-metadata==1.7.0 importlib-metadata==1.7.0
inflection==0.5.0 inflection==0.5.0
......
...@@ -25,6 +25,7 @@ from messaging.ReconnectingMessageManager import ReconnectingMessageManager ...@@ -25,6 +25,7 @@ from messaging.ReconnectingMessageManager import ReconnectingMessageManager
from messaging.rest_fetcher import RestFetcher from messaging.rest_fetcher import RestFetcher
from flask import request from flask import request
from flask import redirect from flask import redirect
from flask_cors import CORS
# init message handler # init message handler
message_handler:MessageHandler = None message_handler:MessageHandler = None
...@@ -33,6 +34,7 @@ def message_received_callback(channel, method, properties, body): ...@@ -33,6 +34,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():
......
...@@ -11,6 +11,7 @@ coverage==5.3.1 ...@@ -11,6 +11,7 @@ coverage==5.3.1
cryptography==3.1 cryptography==3.1
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.1 inflection==0.5.1
......
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