mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[http] Add log for route path access (#152621)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
be430bc107
commit
cf1fbc7c8a
1 changed files with 7 additions and 0 deletions
|
@ -516,6 +516,7 @@ export class HttpServer {
|
|||
}
|
||||
|
||||
private configureRoute(route: RouterRoute) {
|
||||
const optionsLogger = this.log.get('options');
|
||||
this.log.debug(`registering route handler for [${route.path}]`);
|
||||
// Hapi does not allow payload validation to be specified for 'head' or 'get' requests
|
||||
const validate = isSafeMethod(route.method) ? undefined : { payload: true };
|
||||
|
@ -526,6 +527,12 @@ export class HttpServer {
|
|||
xsrfRequired: route.options.xsrfRequired ?? !isSafeMethod(route.method),
|
||||
access: route.options.access ?? (route.path.startsWith('/internal') ? 'internal' : 'public'),
|
||||
};
|
||||
// Log HTTP API target consumer.
|
||||
optionsLogger.debug(
|
||||
`access [${kibanaRouteOptions.access}] [${route.method.toUpperCase()}] for path [${
|
||||
route.path
|
||||
}]`
|
||||
);
|
||||
|
||||
this.server!.route({
|
||||
handler: route.handler,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue