-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CORS middleware #532
Comments
Would you want to propose a PR, as you have a clear idea of the configuration you will need? I understand it should be quick (add https://www.starlette.io/middleware/#corsmiddleware to https://github.com/huggingface/datasets-server/blob/main/services/api/src/api/app.py#L44?) |
Mentioned here: https://github.com/huggingface/autotrain-ui/pull/312 Read https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS. In particular, all the parts that define the expected server behavior, for example, never returning Also, it must respond to the |
See #538. |
* feat: 🎸 support OPTIONS requests (CORS pre-flight requests) Fixes #532 * feat: 🎸 upgrade docker images * fix: 🐛 don't set the Access-Control-Allow-Origin in nginx The services are responsible to set it if required (note that when credentials are passed in the request, the Access-Control-Allow-Origin header must not return *, but the origin) * fix: 🐛 remove obsolete configuration nginx no longer caches the proxied responses
* feat: 🎸 support OPTIONS requests (CORS pre-flight requests) Fixes huggingface/dataset-viewer#532 * feat: 🎸 upgrade docker images * fix: 🐛 don't set the Access-Control-Allow-Origin in nginx The services are responsible to set it if required (note that when credentials are passed in the request, the Access-Control-Allow-Origin header must not return *, but the origin) * fix: 🐛 remove obsolete configuration nginx no longer caches the proxied responses
We will need it to request the dataset server from the browser (eg in AutoTrain)
The text was updated successfully, but these errors were encountered: