Document CLOUDFLARE_CF_FETCH_ENABLED and CLOUDFLARE_CF_FETCH_PATH environment variables#28174
Document CLOUDFLARE_CF_FETCH_ENABLED and CLOUDFLARE_CF_FETCH_PATH environment variables#28174petebacondarwin wants to merge 6 commits intoproductionfrom
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
|
/bonk review and fix any issues |
|
All fixes applied. Here's a summary of the review: Review SummaryVerified correct (no changes needed):
Issues fixed:
|
|
@petebacondarwin - I think we got better results here than Devin ;-) |
| CLOUDFLARE_CF_FETCH_ENABLED=false | ||
| CLOUDFLARE_CF_FETCH_PATH=/tmp/.cf-cache.json |
There was a problem hiding this comment.
It doesn't make sense to have enabled false and a custom path. I think one or the other is best here.
There was a problem hiding this comment.
Fixed — removed CLOUDFLARE_CF_FETCH_PATH from the .env example so it only shows CLOUDFLARE_CF_FETCH_ENABLED=false.
Yep. I think bonk seemed to do a bit better, although I made one comment. Can I just do: /bonk please can you fix the |
|
/bonk please can you fix the .env example to only show one of the two new env vars as setting enabled to false and a custom path together doesn't really make sense. |
|
Looks like I'm not allowed to request bonk changes 😄 |
This comment was marked as abuse.
This comment was marked as abuse.
|
@petebacondarwin weird - you might not be in CODEOWNERS correctly. Let me check. |
|
Hey there, we've marked this pull request as stale because there's no recent activity on it. This label is helps us identify PRs that might need updates (or to be closed out by our team if no longer relevant). |
|
Hey there, we've closed out this pull request because it's been stale for a while and there's been no additional action on it. If these changes are still relevant, open a new pull request (or flag to us in a GitHub issue). |
…ironment variables Add documentation for two new environment variables that control cf.json fetching behavior in Miniflare: - CLOUDFLARE_CF_FETCH_ENABLED: disable cf.json fetching entirely - CLOUDFLARE_CF_FETCH_PATH: use a custom cache location for cf.json Updates both the system environment variables reference page and the Miniflare get-started guide. Related: cloudflare/workers-sdk#12469 Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>
Co-authored-by: elithrar <elithrar@users.noreply.github.com>
Remove CLOUDFLARE_CF_FETCH_PATH from the example since having both enabled=false and a custom path together doesn't make sense. Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>
c454cdd to
fcfc6e4
Compare
|
❌ Cannot revive Devin session - the session is too old. Please start a new session instead. |
1 similar comment
|
❌ Cannot revive Devin session - the session is too old. Please start a new session instead. |
|
I think it would be sensible to let #28364 merge first so there's no conflicts |
|
@MattieTK and @haleycode - this is ready for review |
|
PCX triage note — PCX team pinged the assigned reviewer on 2026-04-17. Waiting for review. |
Summary
Documents two new Miniflare environment variables introduced in cloudflare/workers-sdk#12469:
CLOUDFLARE_CF_FETCH_ENABLED— disablecf.jsonfetching entirely (useful for non-JS Workers projects that don't wantnode_modulescreated)CLOUDFLARE_CF_FETCH_PATH— override the defaultnode_modules/.mf/cf.jsoncache locationChanges span two pages:
CLOUDFLARE_CF_FETCH_ENABLED=falseto the example.envfileRequest#cfObject section with env var usage examples forwrangler devUpdates since last revision
.envexample to only showCLOUDFLARE_CF_FETCH_ENABLED=false(removedCLOUDFLARE_CF_FETCH_PATHfrom the same example, since disabling fetching and setting a custom path together doesn't make sense)*→-) for three pre-existing entries (WRANGLER_HTTPS_KEY_PATH,WRANGLER_HTTPS_CERT_PATH,WRANGLER_R2_SQL_AUTH_TOKEN)Key items for review
/workers/testing/miniflare/get-started/#requestcf-objectresolves correctly (confirmed working in preview)cfoption >CLOUDFLARE_CF_FETCH_ENABLED>CLOUDFLARE_CF_FETCH_PATH> default) matches the implementation in workers-sdk#12469Documentation checklist
Link to Devin run | Requested by: @petebacondarwin