fix: add MEALIE_INTERNAL_URL env var for Docker-to-Docker API calls
When deployed behind Cloudflare Tunnel, requests from the container to the external Mealie URL fail with 530 (hairpin). MEALIE_INTERNAL_URL lets the container use the Docker-internal address (e.g. http://mealie:9000) for API calls while keeping the external URL for browser links. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,10 @@ from pathlib import Path
|
||||
DATA_DIR = Path(os.environ.get("DATA_DIR", "/data"))
|
||||
CONFIG_FILE = DATA_DIR / "config.json"
|
||||
|
||||
# Optional internal URL for Docker-to-Docker API calls (avoids Cloudflare hairpin).
|
||||
# The user-facing mealie_url is still used for browser links.
|
||||
MEALIE_INTERNAL_URL = os.environ.get("MEALIE_INTERNAL_URL", "").strip().rstrip("/")
|
||||
|
||||
_DEFAULTS = {
|
||||
"mealie_url": "",
|
||||
"mealie_api_key": "",
|
||||
|
||||
Reference in New Issue
Block a user