You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-11-03] Run the NewDot Cloudflare Worker in Miniflare during npm run web #104387
The NewDot Cloudflare Worker in web/cloudflare-worker sets the CSP, per-request script nonces, security headers, caching rules, and SPA routing. npm run web doesn't run it, so local development uses none of that behavior.
To run the Worker locally today, you have to install its dependencies separately, put a web build in dist/, and run wrangler dev on port 8787. Few developers do this. As a result, we find CSP and header problems on staging, where they become deploy blockers.
Solution
Make npm run web run the Worker locally in Miniflare (through wrangler dev), so every local session gets the same CSP, headers, and routing as staging and production.
Install the Worker's dependencies as part of the normal App setup.
Add the Worker to the concurrently command in npm run web, and open the browser to the Worker's origin.
Have the Worker serve responses from the rsbuild dev server in development, so hot reload keeps working.
Allow what local development needs in a development-only CSP, such as the HMR websocket and the API proxy on localhost:9000.
Add an opt-out, like USE_WEB_PROXY=false for the proxy.
Update the App README and web/cloudflare-worker/README.md.
changed the title [-]Run the NewDot Cloudflare Worker in Miniflare during `npm run web`[/-][+][Due for payment 2026-11-03] Run the NewDot Cloudflare Worker in Miniflare during `npm run web`[/+]on Oct 27, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.23-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-11-03. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
AndrewGable commentedon Oct 19, 2026
cc @justinpersaud
[-]Run the NewDot Cloudflare Worker in Miniflare during `npm run web`[/-][+][Due for payment 2026-11-03] Run the NewDot Cloudflare Worker in Miniflare during `npm run web`[/+]melvin-bot commentedon Oct 27, 2026
@situchan
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.23-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-11-03. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]