fix: cross-machine access + center filter bar + floating hints
- api.ts: switch baseURL from http://localhost:8001/api/v1 to relative /api/v1. Both nginx (prod) and vite (dev) already proxy /api/ to the backend, so requests become same-origin and the app works from any host (LAN IP, reverse proxy, another machine) with no CORS dance. - backend CORS: open to "*" as a fallback for the rare direct-hit case; the normal flow is same-origin via the proxy and never touches CORS. - App layout: move FilterBar and DiscardActionBar inside the main content column (right of the left sidebar) so the filter row no longer bleeds across the sidebar. - FilterBar: justify-center the pills so they sit centered above the timeline. Clear-all uses ml-2 instead of ml-auto. - KeyboardHints: convert to a floating, glassy pill pinned bottom- center (fixed positioning + backdrop-blur + ring) instead of a flat toolbar row. Removed from the column layout — now mounted as an overlay sibling. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -62,11 +62,16 @@ app = FastAPI(
|
||||
lifespan=lifespan
|
||||
)
|
||||
|
||||
# Configure CORS
|
||||
# Configure CORS. The frontend normally talks to the backend through the
|
||||
# nginx (prod) or vite (dev) proxy, so requests are same-origin and never
|
||||
# trip CORS. The wildcard here is a fallback for the rare case where a
|
||||
# user / script hits the backend directly from a browser at some other
|
||||
# origin (LAN IP, reverse proxy under a different host, etc.). This is a
|
||||
# single-user homelab tool, so a permissive CORS policy is fine.
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["http://localhost:3000", "http://localhost:5173"], # Frontend URLs
|
||||
allow_credentials=True,
|
||||
allow_origins=["*"],
|
||||
allow_credentials=False,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user