mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-09-17 14:42:20 +02:00
fix(basemap): trim header comments to match repo style
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
8f169f1ecc
commit
71550b4adf
+2
-4
@@ -27,10 +27,8 @@ AIS_API_KEY=
|
||||
# Windy Webcams global CCTV layer — free key from https://api.windy.com/webcams/docs
|
||||
# WINDY_API_KEY=
|
||||
|
||||
# CARTO basemap tiles (DEFAULT dark/light map). CARTO now requires an API key;
|
||||
# without one the map still loads but every tile carries an "API KEY REQUIRED"
|
||||
# watermark. Free key (no CARTO account needed, 5M tiles/month fair use):
|
||||
# https://carto.com/basemaps/apikey — used by the frontend container only.
|
||||
# CARTO basemap tiles (DEFAULT map) — free key from https://carto.com/basemaps/apikey
|
||||
# Without it tiles render with an "API KEY REQUIRED" watermark.
|
||||
# CARTO_API_KEY=
|
||||
|
||||
# Telegram OSINT map layer — scrapes public t.me/s channel previews (no bot token).
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
/**
|
||||
* Runtime basemap configuration for the browser map.
|
||||
*
|
||||
* CARTO_API_KEY is a plain server-side env var on the frontend container
|
||||
* (see docker-compose.yml). Like BACKEND_URL it is read at request time, so
|
||||
* operators running the prebuilt GHCR image can set it in .env without a
|
||||
* rebuild. A NEXT_PUBLIC_ var would be baked in at image build time and
|
||||
* therefore always empty for them.
|
||||
*
|
||||
* The key is not a secret in the usual sense — the browser sends it to
|
||||
* CARTO on every tile request — but it is only returned to same-origin
|
||||
* callers of this Next.js server, never proxied to the backend.
|
||||
* Serves CARTO_API_KEY to the browser map. Read from the frontend container's
|
||||
* environment at request time (like BACKEND_URL) so the prebuilt image needs
|
||||
* no rebuild. Consumed by useBasemapConfig().
|
||||
*/
|
||||
|
||||
import { NextResponse } from 'next/server';
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
/**
|
||||
* MapLibre basemap styles backed by CARTO raster tiles.
|
||||
*
|
||||
* CARTO now requires an API key for its basemap tiles; unkeyed requests
|
||||
* return tiles stamped with an "API KEY REQUIRED" watermark. The key is
|
||||
* read at request time by /api/basemap-config (CARTO_API_KEY on the
|
||||
* frontend container) and threaded in here via `buildBasemapStyle`, so
|
||||
* prebuilt Docker images pick it up without a rebuild.
|
||||
*
|
||||
* With no key configured the styles are unchanged from before, so existing
|
||||
* deployments keep working exactly as they did (watermark included).
|
||||
* MapLibre basemap styles on CARTO raster tiles. CARTO requires an API key
|
||||
* (unkeyed tiles are watermarked); MaplibreViewer passes one from
|
||||
* useBasemapConfig() via buildBasemapStyle().
|
||||
*/
|
||||
|
||||
export type BasemapTheme = 'dark' | 'light';
|
||||
@@ -49,6 +42,5 @@ export function buildBasemapStyle(theme: BasemapTheme, cartoApiKey?: string | nu
|
||||
};
|
||||
}
|
||||
|
||||
// Key-less defaults, kept for callers that do not need a CARTO key.
|
||||
export const darkStyle = buildBasemapStyle('dark');
|
||||
export const lightStyle = buildBasemapStyle('light');
|
||||
|
||||
Reference in New Issue
Block a user