trails/apps/planner/app/routes
Ullrich Schäfer e11c9ab58b
Fix /api/overpass 403 behind Caddy reverse proxy
The same-origin check compared the browser's Origin header against
new URL(request.url), but inside the Planner container request.url
is http://planner:3001/... while the browser sends Origin
https://planner.trails.cool — so production always 403'd.

Trust Caddy's X-Forwarded-Host and X-Forwarded-Proto headers when
present (both are set by Caddy's reverse_proxy directive by default)
to reconstruct the external origin the browser actually connected to.
Falls back to request.url for dev and any direct (non-proxied) access.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 02:21:31 +02:00
..
api.overpass.ts Fix /api/overpass 403 behind Caddy reverse proxy 2026-04-18 02:21:31 +02:00
api.route.ts Add route error toasts with waypoint rollback 2026-03-29 14:09:20 +02:00
api.sessions.ts Sync notes through GPX, Journal, and Planner roundtrip 2026-04-11 03:35:40 +02:00
home.tsx Add legal pages, ToS acceptance, and alpha banner 2026-04-18 00:08:48 +02:00
new.tsx Add split export: Export Route vs Export Plan 2026-04-03 10:52:39 +01:00
session.$id.tsx Sync notes through GPX, Journal, and Planner roundtrip 2026-04-11 03:35:40 +02:00