mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
Merge branch 'feat/voice-geometry' into maintainer fixes
Picks upacd87e6c: the keyless cross-site gate on /api/osm/features (582bfce6) and main at93804d5d. SECURITY.md, the format-scope list and the schema-test comments take the branch's side; the place-search budget wording from the timeout fix is kept.
This commit is contained in:
commit
b531dd545b
7 files changed
+21
-12
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import path from 'node:path';
|
||||
import { makeRateLimiter, clientKey } from '../common/rate-limit.js';
|
||||
import { admitSameSite } from '../common/same-site.js';
|
||||
import { admitSameSiteKeyless } from '../common/same-site.js';
|
||||
import { createBoundedCache } from '../common/boundedCache.js';
|
||||
import {
|
||||
compileOsmFeatureQuery,
|
||||
@@ -201,8 +201,9 @@ export function installOsmFeaturesRoute(
|
||||
middlewares.use('/api/osm/features', async (req, res) => {
|
||||
const send = sender(res);
|
||||
if (req.method !== 'GET') return send(jsonError(405, 'Method Not Allowed'));
|
||||
// Quota-bearing: a page elsewhere must not spend the operator's Overpass.
|
||||
if (admitSameSite(req, res)) return undefined;
|
||||
// A page elsewhere must not spend the operator's Overpass. The keyless
|
||||
// gate, as on /api/overpass: voice works behind a reverse proxy too.
|
||||
if (admitSameSiteKeyless(req, res)) return undefined;
|
||||
if (!configured())
|
||||
return send(
|
||||
jsonError(503, 'Place search needs a configured Overpass server.', {
|
||||
|
||||
Reference in new issue
Block a user