Repository navigation
fix(panoramax): load pictures from every instance in the federation - #766
Merged
Merged
Conversation
Panoramax's catalogue lists pictures from many instances, and each item's asset links point at whichever instance or storage bucket holds the file. The image proxy admitted only api.panoramax.xyz and the OSM-France instance, so pictures from IGN, MapComplete and other instances answered "Domain not allowed": in a sample, 44% of Berlin's and 85% of Hamburg's. They never showed in the street-level viewer, and place photos dropped them. Both Panoramax integrations now load images through the catalogue's own per-picture endpoint, which redirects to the file. For a request that starts at that endpoint on an allowlisted Panoramax host, the proxy follows a redirect from a per-picture endpoint to any HTTPS host on the default port. Every hop still connects only to public addresses, and the response must still be a bounded image; a plain file cannot redirect onward, and nothing else changes for other hosts.
Medformatik
enabled auto-merge (squash)
November 4, 2026 00:04
The first version trusted a redirect from any per-picture-shaped path, so a federated instance could chain the proxy through further hops up to the fetch's redirect limit. The policy is now per request and sees every redirect in order: the first only from the requested catalogue URL, the second only from a per-picture endpoint (an instance's, as IGN's leads to its bucket), and none after that.
Medformatik
disabled auto-merge
November 4, 2026 00:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Panoramax is a federation. Its catalogue (
api.panoramax.xyz) lists pictures from many instances, and each item's asset links point at whichever instance or storage bucket holds the file. The image proxy admitted onlyapi.panoramax.xyzandpanoramax.openstreetmap.fr, so every picture from another instance answered403 Domain not allowed: the street-level viewer showed a black frame and place galleries silently left those photos out. In a sample of catalogue searches, that was 44% of Berlin's pictures (IGN and MapComplete) and 85% of Hamburg's (IGN), so this is common in Germany, not an edge case. An allowlist cannot keep up: IGN alone serves its files from an OVH S3 bucket, and the federation adds instances without notice.The catalogue's own per-picture endpoint,
/api/pictures/<uuid>/<size>.jpg, redirects to wherever the file lives. This uses it:panoramaxPictureAssetUrlin core. An item without a picture UUID keeps its asset link.The request URL stays on an allowlisted host, so the place-card photo filter, which checks hosts, keeps accepting these photos. The manifests already describe images from other instances as licensed per item and loaded server-side, so their disclosures are unchanged.
Verification
panoramax.ign.fr→ OVH S3), a MapComplete picture by Cologne Cathedral and an OSM-France picture each returned200 image/jpegforthumb,sdandhd. A raw MapComplete file URL is still refused with 403.apps/api/src/routes, the photo and Panoramax integrations,packages/core/src/utilsandpackages/integration-framework: 2,678 passed.tscforapps/api(with its integrations config) andpackages/core, biome.Release and upgrade impact
Product impact: ordinary
No package release: the only shared-core change adds
panoramaxPictureAssetUrland its type next topanoramaxAuthor; atsupbuild of@openmapx/extension-cliproduces byte-identicaldist/files with and without it.