Closed Jollyfant closed 5 years ago
We can add flask-cors
to Federator venv:
pip install flask-cors
And add the import behind:
from flask_cors import CORS
Patch the app here:
CORS(app)
I monkey patched my service with this change and it works but maybe you have a better solution. I can make a pull request but I'd like your advice on all places where to add the new library (e.g. so dependencies are resolved during installation).
Hi @Jollyfant,
first, thanks. I checked flask-cors
it seems fine for me. It seems under active development.
I rather would enable CORS within the create_app
factory function for each service.
Attached a patch containing the changes necessary. Could you please check if this is working for you? Thx.
Attachments:
Continued in #59
Since the Federator now works well I am changing some data quality interfaces to use it! However it seems CORS is not yet enabled. Should we introduce a decorator or something that patches the response? What is the best place to implement this: