Hi there I am trying to do something that I except is kinda odd. I want to set a dynamic header that gets passed to our custom elasticsearch proxy that the user sets depending on certain criteria.
In Kibana 4 we had access to the $http object so I had something along the lines of if($rootScope.customHeader) { $http.headers = { 'custom': $rootScope.customHeader} }
sorry if my syntax is a bit off
How could one do that now in kibana 6?
I know the rest of the application bit works since I can use postman to test the kibana endpoint /elasticsearch/_msearch and set the headers and see it reach our proxy
I was looking at the courier in the call_clinet part
https://github.com/elastic/kibana/blob/6.0/src/ui/public/courier/fetch/call_client.js#L83 but could not see a obvious way of getting to the request headers.