Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix immutable header mutation in handleThumbnailRequest #4465

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

ikesau
Copy link
Member

@ikesau ikesau commented Jan 17, 2025

Fixes #4450

Our cors middleware mutates all requests, but cached requests are immutable (a quick perusal through Cloudflare Workers/Functions docs didn't state this anywhere, but a lot of other third-party sources did)

This PR clones the cached thumbnail requests so that corsify can mutate them.

These issues are still in the grapher/thumbnail router, but that route should be deprecated, anyway.

@owidbot
Copy link
Contributor

owidbot commented Jan 17, 2025

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-staging-thumbnails

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2025-01-17 23:38:02 UTC
Execution time: 1.16 seconds

Copy link
Member

@marcelgerber marcelgerber left a comment

Choose a reason for hiding this comment

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

Nice fix!

@ikesau ikesau merged commit ce47bab into master Jan 20, 2025
31 checks passed
@ikesau ikesau deleted the staging-thumbnails branch January 20, 2025 15:43
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.

Thumbnails don't work locally or on staging
3 participants