Skip to content

fix(photo-addon): add referrer policy for OSM map tiles#360

Open
paul43210 wants to merge 1 commit intoowncloud:mainfrom
paul43210:fix-photo-addon-map-referer
Open

fix(photo-addon): add referrer policy for OSM map tiles#360
paul43210 wants to merge 1 commit intoowncloud:mainfrom
paul43210:fix-photo-addon-map-referer

Conversation

@paul43210
Copy link
Contributor

Summary

  • OSM tile servers require a Referer header, but oCIS may set a strict Referrer-Policy that strips it
  • Injects <meta name="referrer" content="no-referrer-when-downgrade"> when the map initializes (restored on unmount)
  • Sets referrerPolicy on each tile <img> element via custom TileLayer
  • Failed tiles automatically retry once after 500ms

Test plan

  • Open map view — verify no 403 errors on OSM tiles
  • Pan and zoom the map — verify all tiles load correctly
  • Switch away from map view and back — verify tiles still load

🤖 Generated with Claude Code

OSM's tile servers require a Referer header, but oCIS may set a strict
Referrer-Policy that strips it, causing intermittent 403 errors on map
tiles. Fix: inject a meta referrer tag and set referrerPolicy on each
tile image element. Failed tiles retry once after 500ms.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant