I am tasked with developing an elasticsearch plugin that depends on some headers being passed through by Kibana. I configured Kibana to do so with:
elasticsearch.requestHeadersWhitelist: [ authorization, pernisculous ]
In most cases, the header is passed as expected. Though there is one case where it does not happen. When the user hit the kibana URL in his browser, the very first call made by Kibana to Elasticearch is the following:
This call does not pass any header. I understand it is just for loading configuration from the kibana index. However, since it is related to the original user query, my plugin requires the user's headers to be present.
My question: How can I get these headers passed even by this API? If this is really not supported how could I change the code to have this happen?
I looked a little bit and have the impression it would be somewhere under src/ui/public/index_patterns. But honestly, i could not wrap my head around what is going on.