Addedcors response.

This commit is contained in:
Nicholas Staples
2016-01-20 15:28:39 +00:00
parent 50c3f3dc55
commit 92697d2671

View File

@@ -65,6 +65,13 @@ def init_app(app, config_overrides):
if error:
return error
@app.after_request
def after_request(response):
response.headers.add('Access-Control-Allow-Origin', '*')
response.headers.add('Access-Control-Allow-Headers', 'Content-Type,Authorization')
response.headers.add('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE')
return response
def convert_to_boolean(value):
"""Turn strings to bools if they look like them