mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
Update /_health to accept GET requests (#8234)
Signed-off-by: David Mauskop <david@render.com>
This commit is contained in:
parent
e87af3f6c6
commit
43ff63cc38
@ -277,7 +277,7 @@ class Strapi {
|
|||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
this.app.use(async (ctx, next) => {
|
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.set('strapi', 'You are so French!');
|
||||||
ctx.status = 204;
|
ctx.status = 204;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user