mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 02:32:18 +00:00
Merge remote-tracking branch 'origin/main' into fix/places-no-store-on-errors
This commit is contained in:
commit
b2f746cdb2
18 files changed
+510
-43
No files matched your search
@@ -1,5 +1,13 @@
|
||||
import { resolveGoogleServerKey } from '../../../scripts/google-server-key.mjs';
|
||||
|
||||
/**
|
||||
* Default GEV_RATELIMIT_GOOGLE_PER_MIN for the Places and Geocoding window
|
||||
* and the separate CCTV Street View window, in requests per minute per IP.
|
||||
* The Pinokio build sets the same default in pinokio/_ENVIRONMENT.
|
||||
* `.env.example` suggests 60 for hosts other than localhost.
|
||||
*/
|
||||
export const GOOGLE_DEFAULT_PER_MIN = 120;
|
||||
|
||||
/**
|
||||
* Optional Google place context is an empty capability when no key is present,
|
||||
* not a server outage. Returning 200 keeps a deliberately keyless session out
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
GOOGLE_DEFAULT_PER_MIN,
|
||||
googleServerApiKey,
|
||||
keylessGooglePlacesResponse,
|
||||
keylessGoogleGeocodeResponse,
|
||||
@@ -15,17 +16,7 @@ import {
|
||||
// undefined = not built yet; null = the explicit 0 opt-out; fn = active limiter
|
||||
let _googleRateLimiter;
|
||||
|
||||
/**
|
||||
* Requests/min/IP applied when GEV_RATELIMIT_GOOGLE_PER_MIN is unset. This is
|
||||
* the value the Pinokio build already ships (pinokio/_ENVIRONMENT), so the
|
||||
* packaged app keeps behaving exactly as it does today and only an
|
||||
* unconfigured server changes — from unlimited to what the product already
|
||||
* runs with. Places calls are user-driven (a search, a nearby lookup, an
|
||||
* installation probe) rather than polled, so this sits far above what the app
|
||||
* generates and bites only a caller enumerating the endpoint. `.env.example`
|
||||
* suggests a tighter 60 when the host is not localhost; that still applies.
|
||||
*/
|
||||
export const GOOGLE_DEFAULT_PER_MIN = 120;
|
||||
export { GOOGLE_DEFAULT_PER_MIN };
|
||||
|
||||
/** Google cost endpoints (nearby-places, text-search, geocoding). Null only when set to 0. */
|
||||
function googleRateLimiter() {
|
||||
|
||||
Reference in new issue
Block a user