Load any page directly, not just the calendar (#164) #170
No reviewers
Labels
No labels
area/ai
area/backend
area/frontend
area/infra
area/scheduler
area/wled
good-first-issue
priority/high
priority/low
priority/medium
security
type/bug
type/chore
type/ci-cd
type/docs
type/feature
type/qa
v1.0.0
v1.1.0
v1.2.0
v2.0.0
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED!170
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/164-spa-fallback"
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?
Closes #164.
StaticFiles(html=True)returnedindex.htmlonly for/. So a bookmark to/remote, a reload of/settings, or a deep link into the review queue all returned a 404. The installable app (#154) needs its start URL and shortcuts to load directly.What
backend/app/spa.pyaddsSPAStaticFiles: on a 404 from the normal lookup, it retries withindex.htmland setsCache-Control: no-cacheso a new deploy's shell is picked up straight away. Two kinds of request still 404 for real:/api/,/auth/,/metrics,/openapi.json), so an unknown API route stays a JSON 404 and doesn't turn into a 200 of HTML./assets/). A 200 of HTML for a missing.jsfile fails in the browser as a MIME error, which is much harder to diagnose than a 404.This is a subclass rather than a catch-all route, because the mount is already registered last. Anything that reaches it has already failed every backend route, so no routing knowledge is duplicated.
Verification
/settingsdirectly, then reload it. They use/settingsrather than/remotebecause the E2E container has no controller configured, so/remotewould be testing that gate, not the routing.🤖 Generated with Claude Code