Skip to content

fix(handler): vary cache key by Accept-Encoding to prevent cache poisoning#310

Open
joshfriend wants to merge 1 commit into
mainfrom
jfriend/fix-transport-headers
Open

fix(handler): vary cache key by Accept-Encoding to prevent cache poisoning#310
joshfriend wants to merge 1 commit into
mainfrom
jfriend/fix-transport-headers

Conversation

@joshfriend
Copy link
Copy Markdown
Contributor

Introduce CacheKeyParts to cleanly separate the cache key path from request-derived dimensions like Accept-Encoding. Upstreams like dl.google.com return different content based on Accept-Encoding, and without this the first variant cached gets served to all clients.

@joshfriend joshfriend requested a review from a team as a code owner May 15, 2026 15:36
@joshfriend joshfriend requested review from inez and removed request for a team May 15, 2026 15:36
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b0b1c7032

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/strategy/handler/handler.go
@joshfriend joshfriend force-pushed the jfriend/fix-transport-headers branch from 9b0b1c7 to a68085f Compare May 15, 2026 16:00
…oning

Introduce CacheKeyParts to cleanly separate the cache key path from
request-derived dimensions like Accept-Encoding. Upstreams like
dl.google.com return different content based on Accept-Encoding, and
without this the first variant cached gets served to all clients.
@joshfriend joshfriend force-pushed the jfriend/fix-transport-headers branch 2 times, most recently from a68085f to 17268cc Compare May 15, 2026 16:04
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