mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-09-09 21:49:37 +00:00
fix(docker): allow default dev frontend origins (#4959)
This commit is contained in:
parent
613b90b0e6
commit
8d15b87d8b
@ -80,6 +80,14 @@ def test_bind_address_remains_overridable(variant: str):
|
||||
assert _bind_address(mapping) == "${BIND_HOST:-127.0.0.1}", f"{variant} compose must keep the bind address overridable via BIND_HOST; got: {mapping!r}"
|
||||
|
||||
|
||||
def test_dev_frontend_allows_default_loopback_origins():
|
||||
"""The Docker dev frontend must hydrate on its default published hosts."""
|
||||
compose = yaml.safe_load(COMPOSE_PATHS["dev"].read_text(encoding="utf-8"))
|
||||
environment = compose["services"]["frontend"]["environment"]
|
||||
|
||||
assert "DEER_FLOW_DEV_ALLOWED_ORIGINS=${DEER_FLOW_DEV_ALLOWED_ORIGINS:-127.0.0.1,::1}" in environment
|
||||
|
||||
|
||||
def _bind_address(mapping: str) -> str | None:
|
||||
"""Return the bind-address segment of a compose port mapping, if any.
|
||||
|
||||
|
||||
@ -138,6 +138,7 @@ services:
|
||||
- WATCHPACK_POLLING=true
|
||||
- CI=true
|
||||
- DEER_FLOW_INTERNAL_GATEWAY_BASE_URL=http://gateway:8001
|
||||
- DEER_FLOW_DEV_ALLOWED_ORIGINS=${DEER_FLOW_DEV_ALLOWED_ORIGINS:-127.0.0.1,::1}
|
||||
env_file:
|
||||
- ../frontend/.env
|
||||
networks:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user