mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-30 16:33:16 +00:00
feat(maps): MAP_EXTRA_CONNECT_HOSTS adds the operator's map hosts to the CSP
A GL map fetches its tiles and its style, so a template on a host of the operator's own (a self-hosted tile server) was refused by connect-src while Leaflet drew it as images. The new variable lists such hosts; each entry becomes an https source in connect-src and the same list reaches the client as map_extra_connect_hosts in the app config, so the renderer choice and the policy can never disagree. The variable is owned by readEnv() like the rest of the maps namespace and read once when the middleware is applied. The boot refuses an entry outside the shared grammar; a path that skips the boot check drops it, so a bad value never widens the policy. Unset, the CSP and the app config are as before apart from an empty list. Documented in .env.example, docker-compose.yml, the Helm values and ConfigMap and the wiki. Making room for the app config field shrinks auth.service.ts by one line, and its size baseline follows.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
"src/db/repositories/Trips.repository.ts": 1120,
|
||||
"src/db/repositories/Users.repository.ts": 1421,
|
||||
"src/nest/atlas/atlas.service.ts": 1166,
|
||||
"src/nest/auth/auth.service.ts": 1115,
|
||||
"src/nest/auth/auth.service.ts": 1114,
|
||||
"src/nest/budget/budget.service.ts": 1607,
|
||||
"src/nest/collections/collections.service.ts": 1386,
|
||||
"src/nest/doc-sync/doc-sync.service.ts": 1060,
|
||||
|
||||
Reference in New Issue
Block a user