feat: add host_header config for Docker networking
All checks were successful
Build and Push Docker Image / build (push) Successful in 14s
All checks were successful
Build and Push Docker Image / build (push) Successful in 14s
When Grist validates the Host header (common with reverse proxy setups), internal Docker networking fails because requests arrive with Host: container-name instead of the external domain. The new host_header config option allows overriding the Host header sent to Grist while still connecting via internal Docker hostnames.
This commit is contained in:
@@ -17,6 +17,8 @@ class GristClient:
|
||||
self._doc = document
|
||||
self._base_url = f"{document.url.rstrip('/')}/api/docs/{document.doc_id}"
|
||||
self._headers = {"Authorization": f"Bearer {document.api_key}"}
|
||||
if document.host_header:
|
||||
self._headers["Host"] = document.host_header
|
||||
self._timeout = timeout
|
||||
|
||||
async def _request(self, method: str, path: str, **kwargs) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user