Merge remote-tracking branch 'origin/main' into frontend
This commit is contained in:
commit
37ab7199b4
@ -34,6 +34,14 @@ def create_app():
|
|||||||
# interface blueprint
|
# interface blueprint
|
||||||
application.register_blueprint(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
|
return application
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user