-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Add health-checking endpoint on '/' that always returns 200 #2992
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
Conversation
We needed a health check endpoint that returns 200 for Google Cloud L7 load balancers and they don't support request headers.... |
Thank you, I love this. We wound up adding a similar route in our index.js for our docker containers. It would be nice if everyone could take advantage by making this part of parse-server as a whole and not just the CLI. Want to add it to src/ParseServer.js ? Something like: api.get('/', (req, res) => res.sendStatus(200)) |
Hi Tyler, thank you. I would love to do that! Will make that change tonight. |
@woyorus updated the pull request - view changes |
Something like that? I am not exactly sure if the location for the tests is correct. |
Looks like there are two copies of the same test, I'd pick the one outside of the PublicAPI test suite. Also, I'm also not sure what the best place for that test would be, since there is nothing else quite like it. Maybe index.spec.js would be better? |
Yeah, the location of the test is not much big of a deal IMHO, duplication however :) |
@woyorus updated the pull request - view changes |
Yes you're right. I've introduced duplication because I've seen a However both tests are placed to PublicAPI test suite, but it looks like I've found a better place for that, in |
Waiting for Travis then merging! And releasing a beta :) |
Nice, thanks @woyorus |
Thanks for this, I can use NewRelic to also monitor a URL now.. btw prob should write a small doc for people on this feature.. cheers |
At some point people may need to have an endpoint that simply responds 200 OK without any authentication. In our case, we need it for L7 GSLB health-checker, as we cannot pass any custom auth headers.
This PR would make parse to always respond with 200 and text "Ok" on path
/
.