dakrone / es-mode

An Emacs major mode for interacting with Elasticsearch
GNU General Public License v3.0
195 stars 34 forks source link

Use es-default-headers in es-org-execute-request. #78

Closed dhull closed 3 years ago

dhull commented 3 years ago

Allow users to override the headers sent from ob-elasticsearch by customizing "es-default-headers" just as they can for es-mode.

Background: I am not able to connect directly to my work Elasticsearch instance but I can access it through Kibana. I have managed to advise various es-mode functions to proxy the Elasticsearch requests through Kibana, but Kibana gives me an error if the request doesn't include a kbn-version header. I've already set es-default-headers so that es-mode works, but ob-elasticsearch previously had its own hardcoded list of default headers. This fixes ob-elasticsearch to use es-default-headers instead.