aiidateam / aiida-restapi

AiiDA Web API for data queries and workflow management.
https://aiida-restapi.readthedocs.io
MIT License
9 stars 7 forks source link

enable CORS #6

Open ltalirz opened 3 years ago

ltalirz commented 3 years ago

The aiida-core rest api has extremely liberal cross-origin resource sharing policies (just allowing any origin), see https://github.com/aiidateam/aiida-core/blob/38080c44272a8a5ae24beee7109df9964450a464/aiida/restapi/run_api.py#L91-L93

We can mirror that https://fastapi.tiangolo.com/tutorial/cors/?h=%20cors#use-corsmiddleware

ltalirz commented 3 years ago

As discussed with @NinadBhat and @chrisjsewell , we will mirror the liberal policy in the default configuration of aiida-restapi