mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-11 07:42:20 -05:00
Addedcors response.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user