Commit 0c61eb4e authored by Herry's avatar Herry

[restGateway] added CORS support

parent 3c486da0
......@@ -21,12 +21,14 @@ import connexion
from security import swagger_util
from env_info import is_running_locally, get_resources_path
from flask import request
from flask_cors import CORS
from flask import redirect
# start app
if __name__ == '__main__':
app = connexion.App(__name__, specification_dir='configs/')
CORS(app.app)
@app.app.before_request
def before_request():
......
......@@ -9,10 +9,10 @@ click==7.1.2
clickclick==1.2.2
colorama==0.4.3
connexion==2.7.0
coverage==5.3.1
cryptography==2.9.2
Deprecated==1.2.10
Flask==1.1.2
Flask-Cors==3.0.10
idna==2.10
importlib-metadata==1.7.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