Skip to content

chore(EVO-2178): ship MEDIA_HOST_ALLOWLIST on every deploy surface - #168

Merged
gomessguii merged 1 commit into
developfrom
fix/EVO-2178-media-host-allowlist-env
Jul 21, 2026
Merged

chore(EVO-2178): ship MEDIA_HOST_ALLOWLIST on every deploy surface#168
gomessguii merged 1 commit into
developfrom
fix/EVO-2178-media-host-allowlist-env

Conversation

@gomessguii

Copy link
Copy Markdown
Member

Companion to evolution-foundation/evo-bot-runtime#7 — they should land together.

The bot runtime validates the host of an incoming attachment before fetching it, and reads the authorized hosts from MEDIA_HOST_ALLOWLIST only (an allowlist taken from the event would be chosen by whoever sent the event). Unset means no attachment is fetched, so the variable has to travel with the service or media silently stops reaching the agent.

Set it to the host that signs the attachment URLs: ACTIVE_STORAGE_URL when present, otherwise BACKEND_URL. Add the storage host as well when ActiveStorage runs in redirect mode (presigned S3/MinIO links), or the CDN host when one fronts the CRM.

Wired into:

  • docker-compose.yml${MEDIA_HOST_ALLOWLIST:-localhost}, matching the BACKEND_URL in .env.example
  • internal/review/docker-compose.ymllocalhost,evo_crm
  • docker-compose.swarm.yaml — left blank next to the instructions, like the other per-deployment values there
  • .env.example and .env.swarm.example

No submodule pointers are touched.

Part of EVO-2178.

🤖 Generated with Claude Code

The bot runtime validates the host of an incoming attachment before fetching
it, and reads the authorized hosts from MEDIA_HOST_ALLOWLIST only — an
allowlist taken from the event would be chosen by whoever sent the event.
Unset means no attachment is fetched, so the variable has to travel with the
service or media silently stops reaching the agent.

Set it to the host that signs the attachment URLs: ACTIVE_STORAGE_URL when
present, otherwise BACKEND_URL. Add the storage host as well when
ActiveStorage runs in redirect mode (presigned S3/MinIO links), or the CDN
host when one fronts the CRM.

Wired into docker-compose.yml, docker-compose.swarm.yaml,
internal/review/docker-compose.yml and both env examples. The swarm file
leaves it blank next to the instructions, like the other per-deployment
values there.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @gomessguii, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@gomessguii
gomessguii merged commit 2c348e4 into develop Jul 21, 2026
5 checks passed
@gomessguii
gomessguii deleted the fix/EVO-2178-media-host-allowlist-env branch July 21, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant