mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 02:11:11 -05:00
Merge pull request #26 from alphagov/add_cors_policy
Added cors response.
This commit is contained in:
@@ -65,6 +65,13 @@ def init_app(app, config_overrides):
|
|||||||
if error:
|
if error:
|
||||||
return 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):
|
def convert_to_boolean(value):
|
||||||
"""Turn strings to bools if they look like them
|
"""Turn strings to bools if they look like them
|
||||||
|
|||||||
Reference in New Issue
Block a user