Selectively enable CORS. (#1220)
This commit is contained in:
parent
3e5db9eedb
commit
e09b7eb978
|
@ -124,6 +124,8 @@ def configure_extensions(app):
|
|||
smtp_mail.init_app(app)
|
||||
metrics.init_app(app)
|
||||
sentry.init_app(app)
|
||||
|
||||
if app.config['CORS']:
|
||||
app.config['CORS_HEADERS'] = 'Content-Type'
|
||||
cors.init_app(app, resources=r'/api/*', headers='Content-Type', origin='*', supports_credentials=True)
|
||||
|
||||
|
|
Loading…
Reference in New Issue