You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any way to configure CORS for all Blueprints? If I set up CORS on the app and I register Blueprints then CORS won't work for those Blueprints. So now I have to configure CORS for each Blueprint separately. Furthermore I imagine (docs aren't clear about this) I can configure Flask app with a Config class with CORS_ORIGINS = [...] and it should work. But now CORS does not have access to the app and I have to do it like CORS(blueprint, origins=config_class.CORS_ORIGINS).
Is there a nicer way to do this?
The text was updated successfully, but these errors were encountered:
For me, this worked for registered blueprints as app.register_blueprint(...) but if I registered them in a blueprint, i.e. as nested blueprints (blueprint.register_blueprint(...)) it didn't work. Maybe this is the issue
Is there any way to configure CORS for all Blueprints? If I set up CORS on the app and I register Blueprints then CORS won't work for those Blueprints. So now I have to configure CORS for each Blueprint separately. Furthermore I imagine (docs aren't clear about this) I can configure Flask app with a Config class with
CORS_ORIGINS = [...]
and it should work. But now CORS does not have access to the app and I have to do it likeCORS(blueprint, origins=config_class.CORS_ORIGINS)
.Is there a nicer way to do this?
The text was updated successfully, but these errors were encountered: