Skip to content

Commit

Permalink
Adding API key option to ES config.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysrevans3 committed Jan 3, 2024
1 parent 86a72e7 commit 203b88b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ def _es_config() -> Dict[str, Any]:
if (u := os.getenv("ES_USER")) and (p := os.getenv("ES_PASS")):
config["http_auth"] = (u, p)

if api_key := os.getenv("ES_API_KEY"):
config["headers"]["x-api-key"] = api_key

return config


Expand Down

0 comments on commit 203b88b

Please sign in to comment.