Radar is blank on public location pages (embeds authenticated radar endpoint) #123
Labels
No labels
area:ai
area:ci-cd
area:notifications
area:observability
area:public-pages
backlog
bug
duplicate
enhancement
help wanted
invalid
question
type:decision
type:feature
type:infra
type:maintenance
type:security
v1.0.1
v1.1.0
v1.2.0
v1.3.0
v2.0.0
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/WeatherBot#123
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The public location page (
/api/locations/{id}/public) renders a blank Radar panel for unauthenticated visitors.Cause: the page embeds
<img src="/api/locations/{id}/radar?animated=true">, but that endpoint (app/api/alerts.py::get_radar) requiresDepends(require_user)+can_view_location_with_db. An unauthenticated viewer's image request gets a 302 redirect to login ({"detail":"Found"}) instead of the PNG, so the image fails to load → blank. The radar fetching/caching itself works fine (confirmedradar_KLSX_animatedsuccess in prod logs).Fix: add a
public_enabled-gated, unauthenticatedGET /api/locations/{id}/public/radarroute (mirroring how the public page itself is gated), and repoint the template<img>at it. Image is disk-cached (radar_cache_minutes), so repeat public hits don't reach upstream.Reported by the operator viewing the public page for "Charter - 13736 Riverport".