Make language toggle a segmented control, document localhost/Referer requirement

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Glenn Goossens
2026-11-12 17:47:17 +01:00
co-authored by Claude Sonnet 5.5
parent b6eba89154
commit 9ff7dcb3c2
3 changed files with 22 additions and 6 deletions
+16
View File
@@ -0,0 +1,16 @@
# baken
Static site (Cloudflare assets, `public/` is the asset directory). The hotel map lives in `public/hotelkaart/index.html`.
## Viewing and testing the map
Always serve over `http://localhost`, never open `index.html` as `file://`.
**Why:** the OpenStreetMap tile servers require a `Referer` header (the page sets `referrerPolicy:"origin"` on the tile layer). A `file://` page sends none, so every tile comes back as "403 Access blocked". Seen 2026-11-12.
**How to apply:**
- Serve: `cd ~/projects/baken/public && python3 -m http.server 8799`, then open `http://localhost:8799/hotelkaart/`
- A Claude Code Bash call needs `dangerouslyDisableSandbox: true` for this server, otherwise it answers 404 to every path
- `wrangler dev` fails with Wrangler 4.135.0: `wrangler.jsonc` has compatibility date 2026-11-01, newer than that binary supports (2026-09-25). Upgrade Wrangler first
- Screenshots via Playwright: use the `http://localhost` URL too (it blocks `file:`)
- Dark mode follows the system setting (`prefers-color-scheme`). Mobile layout (language toggle bottom right) at 480px and narrower