Skip to content

[Workers Runtime] Document cache.put rejection of 301/302 redirects with query strings#30891

Open
jayeve wants to merge 1 commit into
cloudflare:productionfrom
jayeve:jayeve/workers-query-string-cache-put-note
Open

[Workers Runtime] Document cache.put rejection of 301/302 redirects with query strings#30891
jayeve wants to merge 1 commit into
cloudflare:productionfrom
jayeve:jayeve/workers-query-string-cache-put-note

Conversation

@jayeve
Copy link
Copy Markdown
Collaborator

@jayeve jayeve commented May 18, 2026

Summary

Adds a note to the Workers Cache API docs explaining that cache.put() silently rejects 301/302 redirect responses when the cache key excludes the query string and the Location header contains it. This is an existing anti-cache-poisoning mitigation that is not currently documented, causing confusion for customers using the Cache API with redirect responses on custom domain Worker routes.

Documentation checklist

…ith query strings

**Summary**

Adds a note to the Workers Cache API docs explaining that cache.put()
silently rejects 301/302 redirect responses when the cache key excludes
the query string and the Location header contains it. This is an existing
anti-cache-poisoning mitigation that is not currently documented,
causing confusion for customers using the Cache API with
redirect responses on custom domain Worker routes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants