Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developersβ€’13mo agoβ€’
23 replies
svend

Worker w static assets - Too many 301 redirects (ERR_TOO_MANY_REDIRECTS)

I have made a marketing webpage on a cloudflare worker w static assets (using "assets": { "directory": "./build/client/" } in wrangler json),
Most requests on page load are static assets with content hashed filenames (React Router v7) . Since RR is code splitting, there are about 30 requests being fired around the same time on a page load.

The assets are verified delivered without invoking the worker, but there are intermittent periods where one or more of the static assets are returning enough 301 responses for Chrome to stop loading the request and returns a ERR_TOO_MANY_REDIRECTS in the console.

The strange thing is that it happens only occasionally but can last for minutes. When a chunk of JS, the main CSS file or a font doesn't load, that is obviously pretty bad (as in page breaks completely)

Any thoughts on what can be the reason?

There are two redirect rules set up on the domain (see attachment), but since there is no systematic redirect on load (only intermittent), I don't suspect these being the culprit.
image.png
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Worker Static Assets __redirects
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
16mo ago
Too many redirects
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
worker static assets
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
14mo ago
Worker - too many subrequests
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago