Kibana Plugin Development: Any way to access the headers?


I'm currently working on a Kibana Plugin, and would like to know if there is any way to access the headers that have been sent to Kibana?

We are using an external SSO platform that uses two custom headers that are used to grant access rights or not. Would there be any way retrieve them from the plugin?


Hey @Dasko,

This is subject to change, as Kibana is currently undergoing a major restructuring to a new plugin architecture, but for now, you should be able to do something like this:

// Request interceptor, runs on every incoming request
server.ext('onRequest', async (request, h) => {
      const headers = request.headers;


      return h.continue;

onRequest is part of Hapi's request lifecycle. Details on that can be found in their docs here:

Thank you @Larry_Gregory!

I had no idea I could do that, I will look into Hapi. Thank you for your fast answer, it is much appreciated.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.