mirror of
https://github.com/strapi/strapi.git
synced 2025-09-22 23:09:47 +00:00
Fix route health
This commit is contained in:
parent
572c4452f7
commit
16b5056200
@ -148,7 +148,8 @@ class Strapi extends EventEmitter {
|
|||||||
async load() {
|
async load() {
|
||||||
strapi.app.use(async (ctx, next) => {
|
strapi.app.use(async (ctx, next) => {
|
||||||
if (ctx.request.url === '/_health' && ctx.request.method === 'HEAD') {
|
if (ctx.request.url === '/_health' && ctx.request.method === 'HEAD') {
|
||||||
ctx.set('strapi', 'heartbeat');
|
ctx.set('strapi', 'You are so French !');
|
||||||
|
ctx.set('status', 204);
|
||||||
} else {
|
} else {
|
||||||
await next();
|
await next();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user