Cameras: redact API keys from feed errors; gate TfL/Calgary; clamp map bbox

- Feed/catalog error text (shown to every signed-in user via GET /cameras and
  /traffic/511 status fields) carried httpx's full request URL, including
  ?key= for Ontario 511 and the 511NY DAA key. Query strings are now dropped.
- TfL and Calgary licences are per GEV only (TfL's terms page 403'd), the same
  footing as Ontario 511, so they are UNVERIFIED (acknowledgement required)
  instead of ungated attribution_required. Attribution still renders.
- The map camera layer clamps its bbox to +/-180/+/-90; zoomed-out bounds
  produced a 422 ("could not reach server").

Refs server-26#198

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Logan Cusano
2026-10-04 18:06:47 -04:00
co-authored by Claude Opus 5.5
parent e6b1581139
commit 2f21728bce
5 changed files with 52 additions and 8 deletions
+9 -4
View File
@@ -177,9 +177,12 @@ class CalgaryProvider(CameraProvider):
meta = ProviderMeta(
id="calgary", name="Open Calgary traffic cameras", region="Calgary, Alberta",
coverage=(50.8, -114.5, 51.3, -113.8),
# UNVERIFIED like Ontario 511: the OGL - Calgary grant is per GEV, not read
# first-hand (camera-sources.md: "Yes, attribution (per GEV)"), so it is gated.
licence=LicenceInfo(
status=Licence.ATTRIBUTION_REQUIRED, label="Commercial OK with attribution (OGL - City of Calgary)",
terms="Open Government Licence - City of Calgary: reuse permitted with attribution.",
status=Licence.UNVERIFIED,
label="Licence UNVERIFIED -- OGL - City of Calgary per GEV, terms page not read first-hand",
terms="Open Government Licence - City of Calgary (reuse with attribution) per GEV; not confirmed first-hand.",
terms_url="https://data.calgary.ca/stories/s/Open-Calgary-Terms-of-Use/u45n-7awa",
attribution="Contains information licensed under the Open Government Licence - City of Calgary",
attribution_url="https://data.calgary.ca"),
@@ -215,9 +218,11 @@ class TflProvider(CameraProvider):
meta = ProviderMeta(
id="tfl", name="TfL JamCams", region="London, UK",
coverage=(51.2, -0.7, 51.8, 0.4),
# UNVERIFIED: the TfL terms page 403'd during the survey and the grant is
# per GEV only (camera-sources.md: "re-read"), so it is gated until re-read.
licence=LicenceInfo(
status=Licence.ATTRIBUTION_REQUIRED,
label="Commercial OK with attribution (\"Powered by TfL Open Data\") -- TfL terms page not re-read",
status=Licence.UNVERIFIED,
label="Licence UNVERIFIED -- commercial OK with attribution per GEV; TfL terms page not read first-hand",
terms="TfL transport data terms: free incl. commercial, with attribution (per GEV; the terms page "
"returned 403 during the survey -- re-read before selling).",
terms_url="https://tfl.gov.uk/info-for/open-data-users/our-open-data",