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" ...@@ -19,7 +19,7 @@ debug_flask="false"
[api] [api]
api_port=8008 api_port=8008
api_cors="*"
[federation] [federation]
......
...@@ -19,7 +19,7 @@ debug_flask="false" ...@@ -19,7 +19,7 @@ debug_flask="false"
[api] [api]
api_port=8008 api_port=8008
api_cors="*"
[federation] [federation]
......
...@@ -19,7 +19,7 @@ debug_flask="false" ...@@ -19,7 +19,7 @@ debug_flask="false"
[api] [api]
api_port=8008 api_port=8008
api_cors="*"
[federation] [federation]
......
...@@ -64,6 +64,11 @@ api = connexion.App(__name__, specification_dir='rest/swagger', arguments={'titl ...@@ -64,6 +64,11 @@ api = connexion.App(__name__, specification_dir='rest/swagger', arguments={'titl
api.add_api('swagger.yaml', pythonic_params=True) api.add_api('swagger.yaml', pythonic_params=True)
app = build_app(api.app) 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(): def startup():
""" """
......
...@@ -19,7 +19,7 @@ debug_flask="false" ...@@ -19,7 +19,7 @@ debug_flask="false"
[api] [api]
api_port=8010 api_port=8010
api_cors="*"
[federation] [federation]
......
...@@ -19,7 +19,7 @@ debug_flask="false" ...@@ -19,7 +19,7 @@ debug_flask="false"
[api] [api]
api_port=8008 api_port=8008
api_cors="*"
[federation] [federation]
......
...@@ -19,7 +19,7 @@ debug_flask="false" ...@@ -19,7 +19,7 @@ debug_flask="false"
[api] [api]
api_port=8009 api_port=8009
api_cors="*"
[federation] [federation]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment