Skip to content

Commit

Permalink
Update /_health to accept GET requests
Browse files Browse the repository at this point in the history
Signed-off-by: David Mauskop <david@render.com>
  • Loading branch information
davidmauskop committed Oct 7, 2020
1 parent e0287c8 commit 9f77209
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/strapi/lib/Strapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class Strapi {

async load() {
this.app.use(async (ctx, next) => {
if (ctx.request.url === '/_health' && ctx.request.method === 'HEAD') {
if (ctx.request.url === '/_health' && ['HEAD', 'GET'].includes(ctx.request.method)) {
ctx.set('strapi', 'You are so French!');
ctx.status = 204;
} else {
Expand Down

0 comments on commit 9f77209

Please sign in to comment.