Fix: CORS headers missing on photo static files #207
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api#207
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Discovered during girls roster validation 2026-03-28. Marcus's iPhone getting ERR_BLOCKED_BY_ORB and ERR_NETWORK_CHANGED on player photos. Related to westside-app#129.
Repo
forgejo_admin/basketball-apiUser Story
As an admin, I want to assign players to teams via draft board so that placement is transparent and trackable (WS-S6).
Context
Player photos are served from
basketball-api.tail5b443a.ts.net/uploads/photos/via FastAPI StaticFiles mount. The westside-app loads these cross-origin fromwestsidekingsandqueens.tail5b443a.ts.net. The CORS middleware on the FastAPI app does NOT apply to mounted sub-applications (StaticFiles). Chrome blocks the responses with ORB (Cross-Origin Read Blocking), causing perpetual loading on the draft board.File Targets
Files the agent should modify:
src/basketball_api/main.py-- move StaticFiles mount out of lifespan, or replace with a custom route that serves files with CORS headersFiles the agent should NOT touch:
Acceptance Criteria
curl -I https://basketball-api.tail5b443a.ts.net/uploads/photos/ANY.jpegincludesAccess-Control-Allow-OriginheaderTest Expectations
pytest tests/passespytest tests/ -xConstraints
Checklist
Related
project-westside-basketball-- project this affectswestside-app#129-- parent validation ticketbasketball-api#205-- related data cleanup