Open mfrlin opened 4 years ago
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?