Try to fix cors issue
This commit is contained in:
parent
72716c3c82
commit
5bb16e6d98
@ -34,6 +34,14 @@ def create_app():
|
||||
# interface blueprint
|
||||
application.register_blueprint(interface_blueprint)
|
||||
|
||||
# CORS: Allow * for developing
|
||||
@application.after_request # blueprint can also be app~~
|
||||
def after_request(response):
|
||||
header = response.headers
|
||||
header['Access-Control-Allow-Headers'] = 'Content-Type'
|
||||
header['Access-Control-Allow-Origin'] = '*'
|
||||
return response
|
||||
|
||||
return application
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user