Skip to content

Re-gate same-origin video delivery per app (undo 3b88f13, capacity) - #277

Merged
switch-urfit merged 1 commit into
releasefrom
fix/gate-same-origin-video
Sep 4, 2026
Merged

Re-gate same-origin video delivery per app (undo 3b88f13, capacity)#277
switch-urfit merged 1 commit into
releasefrom
fix/gate-same-origin-video

Conversation

@switch-urfit

Copy link
Copy Markdown
Contributor

Why

Unconditional same-origin delivery (3b88f13) routed every tenant's video manifests/segments through this service; the prod ECS swap to sha-a65bafb was rolled back for capacity. This restores the per-app gate so the integrated path is opt-in.

What

  • Clean revert of 3b88f13 on top of releaseisSameOriginMediaApp (app_setting cdn.same_origin='1') decides per request; default = original CloudFront URLs, zero media bytes through ECS
  • Keeps a65bafb (User-Agent forward) and 5589469 (SSRF constraint)
  • Same switch as lodestar-app-backend PR #384: one setting per tenant turns static + video integrated

Rollout

  • Merge → image sha-<commit> builds automatically; prod ECS swap stays manual
  • qiuzhen needs app_setting (qiuzhen, cdn.same_origin, '1') at cut-over; without the row it just stays on CloudFront (safe either way)
  • With this + PR #384 merged, the capacity failure mode of 08-28 structurally cannot recur

🤖 Generated with Claude Code

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>
@switch-urfit

Copy link
Copy Markdown
Contributor Author

CI note: Test on Push is red on every push of this repo since at least 2026-08-06 (release tip a65bafb fails at Unit Testing). This branch's first run additionally died earlier at Build Docker Stackbitnami/postgresql:latest pull failed against Docker Hub (auth/token error; unrelated to the 3-file revert). Re-ran the workflow; treat the pre-existing red as the baseline when reviewing.

@switch-urfit

Copy link
Copy Markdown
Contributor Author

CI rerun update: past the Docker Hub flake, the run now fails at Unit Testing with exactly the baseline's failing suitesactivity.controller.spec.ts + activity.service.spec.ts, identical to release@a65bafb (the image that ran in prod). The reverted video.service.spec.ts passes. Net: this PR is at CI parity with the release tip; zero new failures.

@switch-urfit
switch-urfit merged commit 54b6669 into release Sep 4, 2026
4 of 7 checks passed
@switch-urfit
switch-urfit deleted the fix/gate-same-origin-video branch September 4, 2026 03:46
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