Skip to content

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

Open
mmattel wants to merge 2 commits intomainfrom
mm-fix-photo-addon-map-referer
Open

MM: fix(photo-addon): add referrer policy for OSM map tiles#361
mmattel wants to merge 2 commits intomainfrom
mm-fix-photo-addon-map-referer

Conversation

@mmattel
Copy link
Copy Markdown
Contributor

@mmattel mmattel commented Mar 22, 2026

Supercedes: #360

CI working mirror of #360
@paul43210 FYI

@mmattel mmattel requested a review from LukasHirt March 22, 2026 16:29
@mmattel mmattel changed the title Mm fix photo addon map referer MM: fix(photo-addon): add referrer policy for OSM map tiles Mar 22, 2026
Copy link
Copy Markdown
Collaborator

@LukasHirt LukasHirt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typecheck failed in CI.

@mmattel mmattel force-pushed the mm-fix-photo-addon-map-referer branch from f589633 to c85b1d8 Compare March 25, 2026 08:15
@mmattel
Copy link
Copy Markdown
Contributor Author

mmattel commented Mar 25, 2026

@LukasHirt
Tested locally, the fix works. For details on the change see #360.
Running pnpm check:types locally does not report an error, means the typecheck passes now.

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>
@mmattel mmattel force-pushed the mm-fix-photo-addon-map-referer branch from c85b1d8 to 4fe0d17 Compare March 26, 2026 16:22
Replace L.TileLayer.extend() with event-based approach using
tileloadstart/tileerror events. The previous approach accessed
the protected createTile method, causing TypeScript errors in CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Martin Mattel <github@diemattels.at>
@mmattel mmattel force-pushed the mm-fix-photo-addon-map-referer branch from 4fe0d17 to 6876d6a Compare April 2, 2026 08:10
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.

3 participants