Skip to content

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

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

[Workers Runtime] Document cache.put rejection of 301/302 redirects with query strings#30893
jayeve wants to merge 1 commit into
productionfrom
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.
@github-actions
Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/workers/ @cloudflare/workers-docs, @GregBrimble, @irvinebroque, @mikenomitch, @korinne, @WalshyDev, @cloudflare/deploy-config, @cloudflare/product-owners, @cloudflare/wrangler, @MattieTK, @cloudflare/dev-plat-leads

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