-
-
Notifications
You must be signed in to change notification settings - Fork 794
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
Gotify component health CORS issue #822
Comments
Hello, I don't have a Gotify server to check, but I think it's normal the headers are not sent with the /health request, I think this endpoint is public and does not requires the auth token. How did you managed to allow CORS? directly in Gotify? It could be a bug in Gotify where headers are not sent on the health endpoint. You could try to confirm that by performing a curl request to check the headers, something like |
Checked that, this is what curl returns:
Going to /health in a browser returns health and database as "green". As for how I enabled cors, you can do that either in the gotify config file or environmental variables in docker (which I chose to do):
Either way, this is not a big issue really, just a thing that I thought I might report so it's fully functional. |
Describe the bug
"http://gotify.server.local/health" reports missing CORS header "Access-Control-Allow-Origin". I've managed to allow CORS in Gotify. The service reads message counts but fails to read Gotify's health status.
This bit (lines 54-67) seems to push headers only for messages, but not the health requests. Could be an easy fix but haven't tested it.
As a side note this bit (lines 41-47) returns green health regardless if it achieves connection. Should probably return red by default.
Expected behavior
No errors
Logs & errors
Browser console output:
Screenshots
n/a
Configuration
n/a
The text was updated successfully, but these errors were encountered: