Fix/thumbnail fix#7
Merged
Merged
Conversation
…irect Thumbnail hrefs point at datahub.creodias.eu, which 301-redirects to the identical path on zipper.creodias.eu. Only the final zipper response carries CORS headers; the 301 from datahub does not. Since the browser enforces CORS on every hop of a redirect chain, the maplibre WebGL texture fetch (crossOrigin 'anonymous') was blocked at the redirect before reaching the CORS-* image, breaking thumbnails on GitHub Pages. In prod, thumbForMap now rewrites the datahub host straight to zipper, skipping the redirect entirely. Dev still proxies via /thumb (followRedirects). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Add LICENSE (MIT) and "license"/"homepage"/"repository" fields in package.json. - Add a License section and a live demo link to the GitHub Pages deployment. - Add CI, demo, license, and stack badges to the README header. - Correct the CORS note: the STAC API sends Access-Control-Allow-Origin: *, so no proxy is needed for data; document the datahub->zipper thumbnail redirect and the host-rewrite fix instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lish Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes the CORS error that broke quicklook thumbnails in the deployed GitHub Pages app, plus repo housekeeping.
Thumbnail CORS fix
The STAC API is fine in prod (stac.dataspace.copernicus.eu sends Access-Control-Allow-Origin: *). The real problem was thumbnails: their hrefs point at datahub.creodias.eu, which 301-redirects to the same path on zipper.creodias.eu. Only the
final zipper response carries CORS headers — the redirect does not — and the browser enforces CORS on every redirect hop, so the maplibre WebGL texture fetch (crossOrigin='anonymous') was blocked before reaching the image.
thumbForMap in src/components/MapView.tsx now rewrites the datahub host straight to zipper.creodias.eu in production, skipping the redirect. Dev still proxies via /thumb. Zero infrastructure — just a URL rewrite.
Docs & metadata
Test plan