mirror of
https://github.com/strapi/strapi.git
synced 2025-09-21 22:40:24 +00:00
Fix route health
This commit is contained in:
parent
572c4452f7
commit
16b5056200
@ -64,4 +64,4 @@
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
@ -118,4 +118,4 @@
|
||||
"uglifyjs-webpack-plugin": "^1.0.0-beta.2",
|
||||
"webpack-bundle-analyzer": "^2.9.0"
|
||||
}
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user