-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend /api/status to support HEAD request #6145
Comments
Probably not something we'll add near term, but I'd take a pull for it. |
I guess it is not possible to complete. Looks like they have OPTIONS in favor of HEAD, server.route({
method: 'GET',
path: '/api/status',
handler: function (request, reply) {
return reply({
status: kbnServer.status.toJSON(),
metrics: kbnServer.metrics
});
}
}); results in error However if you'd issued OPTIONS under Do you have any idea why that happens ? |
Looks like hapi always uses GET handlers for HEAD requests. You would need to detect the method within the handler to see if it's a HEAD request, but that sounds dirty to me. If all you're looking for is a 200/503 api I suggest sending HEAD request to If you want a simpler status API, I think an api like |
@spalger, that is exactly what I've been doing :) (i.e. sending request to /app/kibana). |
cc @elastic/kibana-operations |
Closing this in favor of creating a new endpoint for this purpose which is tracked here. |
I've been checking out Kibana status page recently and what I really missed was support for HEAD method for /api/status call. An idea would be to respond with OK code if overall status is green and with 503 if something is unavailable.
This issue is enhancement proposal.
The text was updated successfully, but these errors were encountered: