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
In a perfect world it would be done by a plugin but since I need to add these custom headers to things like msearch it will probably need to add it to my kibana fork
Just to complete this thread with how I finally got dynamic http headers working. I used the $httpProvider.interceptors and pushed a factory that contains the rootscope from my plugin
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.