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
Update /_health to accept GET requests #8234
Update /_health to accept GET requests #8234
Conversation
Signed-off-by: David Mauskop <david@render.com>
7992fb7
to
9f77209
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM I would prefer this also, would be nice.
Codecov Report
@@ Coverage Diff @@
## master #8234 +/- ##
==========================================
+ Coverage 32.96% 33.03% +0.07%
==========================================
Files 1197 1219 +22
Lines 13020 13563 +543
Branches 1286 1348 +62
==========================================
+ Hits 4292 4481 +189
- Misses 7885 8200 +315
- Partials 843 882 +39
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Great, thanks! I'll update the doc and our repos once this is part of a release. |
Nice. I was just looking for this, and I also use render.com. Thanks @davidmauskop. How do I get this update as I see it just got merged, so does not yet work on v3.2.1. |
@nnennajohn My pleasure! It looks like this change will be part of v3.2.2. I don't know exactly when v3.2.2 will be published, but the Strapi folks do a great job of making frequent releases, as you can see here: https://github.com/strapi/strapi/releases. The Strapi on Render example repos (see https://render.com/docs/deploy-strapi) will be updated to use v3.2.2 shortly after it's published. If you aren't already, I'd recommend "watching" this repo if you want to be notified about releases. |
Ok. Great. Thanks @davidmauskop |
FYI @davidmauskop @nnennajohn v3.2.3 has been released and this should be included in it. |
@davidmauskop great. Thanks so much! |
Description of what you did:
I updated the health check to handle both GET and HEAD requests, where before it only handled HEAD requests.
More context:
I'm an engineer at Render, and recently worked on our Deploy Strapi doc and Strapi example repos. Render uses health checks to enable zero downtime deploys, as described here: https://render.com/docs/zero-downtime-deploys. Our health checks use GET requests, so currently we're recommending that people deploying Strapi on Render create a file at
/public/healthz/index.html
with contentsOK
, and specify/healthz
as their health check path. This is okay, but it would be cleaner if we could use the existing health check at/_health
.I imagine this could be helpful for Strapi users on other platforms as well.