Re-gate same-origin video delivery per app (undo 3b88f13, capacity) - #277
Merged
Conversation
Reverts "refactor: make same-origin video delivery unconditional (drop per-app gate)". Unconditional same-origin delivery routed every tenant's manifests/segments through this service and exceeded prod capacity — the image swap was rolled back on 2026-08-2x for exactly this. Restores d31af8f behaviour: only tenants with app_setting cdn.same_origin = '1' get same-origin manifests and segment pass-through; everyone else keeps CloudFront URLs and never touches this service for media. Keeps a65bafb (User-Agent forwarding) and 5589469 (SSRF constraint) intact on top. Same per-app switch as lodestar-app-backend PR #384 — one setting turns a tenant fully integrated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
CI note: |
Contributor
Author
|
CI rerun update: past the Docker Hub flake, the run now fails at Unit Testing with exactly the baseline's failing suites — |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Unconditional same-origin delivery (
3b88f13) routed every tenant's video manifests/segments through this service; the prod ECS swap tosha-a65bafbwas rolled back for capacity. This restores the per-app gate so the integrated path is opt-in.What
3b88f13on top ofrelease—isSameOriginMediaApp(app_setting cdn.same_origin='1') decides per request; default = original CloudFront URLs, zero media bytes through ECSa65bafb(User-Agent forward) and5589469(SSRF constraint)Rollout
sha-<commit>builds automatically; prod ECS swap stays manualqiuzhenneedsapp_setting (qiuzhen, cdn.same_origin, '1')at cut-over; without the row it just stays on CloudFront (safe either way)🤖 Generated with Claude Code