Fix route health

This commit is contained in:
Aurelsicoko 2017-09-26 17:56:44 +02:00
parent 572c4452f7
commit 16b5056200
3 changed files with 4 additions and 3 deletions

View File

@ -148,7 +148,8 @@ class Strapi extends EventEmitter {
async load() {
strapi.app.use(async (ctx, next) => {
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 {
await next();
}