-
Notifications
You must be signed in to change notification settings - Fork 12k
Fix CORS for /health endpoint #6892
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
base: master
Are you sure you want to change the base?
Conversation
Health endpoint is not supposed to be called cross origin |
@phymbert I see. Without this, a health check inside a browser client fails. What's the reason for preventing browser-side health checks? The benefit is that I can poll the endpoint at startup and queue any inference until it's ready. |
What's the motivation to call health on a browser? Will you restart the server from there ? |
Calling /health allows the client to delay and queue inference until the server is set up, which is useful when spinning up development environments. What's the reasoning for not having /health be cross-origin? If it's a security issue, maybe /ping or similar endpoint works as a way to enable this behavior? Otherwise I can just use a reverse proxy as suggested. Thanks. |
/health
is missingAccess-Control-Allow-Origin
. This sets it to the request origin, in line with the other endpoints.