Skip to content
Snippets Groups Projects
Commit d0c03d5e authored by David Trattnig's avatar David Trattnig
Browse files

Default CORS setting. aura/engine-clock#1

parent 6545f8c3
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ debug_flask="false"
[api]
api_port=8008
api_cors="*"
[federation]
......
......@@ -19,7 +19,7 @@ debug_flask="false"
[api]
api_port=8008
api_cors="*"
[federation]
......
......@@ -19,7 +19,7 @@ debug_flask="false"
[api]
api_port=8008
api_cors="*"
[federation]
......
......@@ -64,6 +64,11 @@ api = connexion.App(__name__, specification_dir='rest/swagger', arguments={'titl
api.add_api('swagger.yaml', pythonic_params=True)
app = build_app(api.app)
@app.after_request
def after_request(response):
header = response.headers
header['Access-Control-Allow-Origin'] = config.get("api_cors")
return response
def startup():
"""
......
......@@ -19,7 +19,7 @@ debug_flask="false"
[api]
api_port=8010
api_cors="*"
[federation]
......
......@@ -19,7 +19,7 @@ debug_flask="false"
[api]
api_port=8008
api_cors="*"
[federation]
......
......@@ -19,7 +19,7 @@ debug_flask="false"
[api]
api_port=8009
api_cors="*"
[federation]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment