Proxy kiwix-serve through this app instead of linking to it directly
map.priesol.net sits behind a reverse proxy that only forwards to maptool itself, so the previous approach (publish kiwix-serve's port, link the browser straight at it) had no address a real browser could ever reach — not just a Docker-internal hostname as first assumed, but no host/port combination at all works from outside. GET /kiwix/* now proxies to kiwix-serve (Kiwix.proxy in lib/maptool/kiwix.rb, a plain Net::HTTP passthrough), and the kiwix service runs with --urlRootLocation=/kiwix so every link/asset it emits already carries that same prefix and needs no rewriting (confirmed against libkiwix/internalServer.cpp, which strips this exact prefix off incoming requests). Drops the port-publishing approach from the previous commit entirely.
This commit is contained in:
1 parent
9997a8a8c0
commit
5ff9b113d9
7 files changed
+107
-51
No files matched your search
@@ -14,7 +14,7 @@ independence from connectivity.
|
||||
* [ ] Contour lines from OSM for hikes and mountain passes
|
||||
* [x] Overpass/OSM scripts to extract POIs (drinking water, dump stations, LPG, public toilets, laundromats, shops, springs) — `rake overpass:pois`, see docs/development.adoc; writes a `.geojson` to drop in `data/gpx/` or upload, not called by the running app itself
|
||||
* [ ] Import Park4Night / iOverlander / Freecampsites data
|
||||
* [x] Kiwix/ZIM offline Wikipedia linked to POI GPS coordinates — a "Nearby on Wikipedia" popup link straight to kiwix-serve's own geo search (`GET /search?latitude=&longitude=&distance=`, confirmed from its actual source, `libkiwix/internalServer.cpp`), not proxied/embedded — it already has a full search UI. `KIWIX_URL` + `GET /api/kiwix` reachability check, same optional-integration pattern as offline.pmtiles/terrain.pmtiles; `docker-compose.yaml` now runs a `kiwix` service, ZIM not included (see docs/development.adoc for where to get one). Not live-tested against a real ZIM (none available here) — verified via a stand-in local HTTP server + real popup-link generation
|
||||
* [x] Kiwix/ZIM offline Wikipedia linked to POI GPS coordinates — a "Nearby on Wikipedia" popup link to kiwix-serve's own geo search (`GET /kiwix/search?latitude=&longitude=&distance=`), proxied through this app (`GET /kiwix/*` in app.rb) rather than a direct link to kiwix-serve — production sits behind a reverse proxy that only forwards to this app, so no address exists for a browser to reach kiwix-serve at directly; kiwix-serve runs with `--urlRootLocation=/kiwix` so its own emitted links already match. `KIWIX_URL` + `GET /api/kiwix` reachability check, same optional-integration pattern as offline.pmtiles/terrain.pmtiles; `docker-compose.yaml` now runs a `kiwix` service, ZIM not included (see docs/development.adoc for where to get one)
|
||||
* [x] Cache weather forecast when temporarily connected — Open-Meteo 3-day forecast in the Radar flyout, last successful fetch cached in localStorage as a fallback when offline
|
||||
** [x] Cache the radar tile *images* too — `public/sw.js`, network-falling-back-to-cache for RainViewer tile requests, registered from layout.erb
|
||||
|
||||
|
||||
Reference in new issue
Block a user