We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54a487f commit 8c9fc5eCopy full SHA for 8c9fc5e
stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/config.py
@@ -40,8 +40,15 @@ def _es_config() -> Dict[str, Any]:
40
config["http_auth"] = (u, p)
41
42
if api_key := os.getenv("ES_API_KEY"):
43
- config = {**config, **{"headers": {"x-api-key": api_key}}}
+ if isinstance(config["headers"], dict):
44
+ headers = {**config["headers"], "x-api-key": api_key}
45
46
+ else:
47
+ headers = {"x-api-key": api_key}
48
+
49
+ config["headers"] = headers
50
51
+ print(config)
52
return config
53
54
0 commit comments