fix(security): add cross-site gate to military-installations proxy

The /api/military-installations endpoint was the last keyless proxy without
the admitSameSite gate that protects terrain, CCTV, traffic, places, and
Celestrak. A cross-site <img>, foreign Origin, opaque origin, or
reverse-proxy-forwarded request now receives 403 before any Overpass query.
Same-origin app requests and bare tool requests continue to work.

Adds 4 integration tests (cross-site refused, same-origin admitted,
bare tool admitted, proxied refused) following the terrainHeightsBounds
test pattern.
This commit is contained in:
Sunil56224972 committed 2026-10-27 18:21:53 +05:30
1 parent 15de9d738c
commit accb8983ca
5 files changed
+233 -1

No files matched your search

+3 -1
View File
@@ -298,7 +298,9 @@
"server/providers/overpass/transport.js",
"src/sources/httpBody.js",
"src/i18n/marker.js",
"src/sources/rateLimit.js"
"src/sources/rateLimit.js",
"server/providers/common/same-site.js",
"src/localRequestGate.mjs"
],
"external": []
},