Workers SDK Issue Reports

← Back to Dashboard

#10992 Invalid _redirects configuration causes infinite loop when deploying to Cloudflare Workers

Recommendation:KEEP OPEN
Difficulty:n/a
Reasoning:

API/backend issue (not wrangler). Wildcard `/* /index.html 200` is intentionally blocked to prevent infinite loops. User requests better error messaging. Labeled `internal`/`api`.

Suggested Action:

Keep open for improved error messaging. Provide workaround comment for deleting/modifying _redirects file.

Analysis Report

Issue Review: cloudflare/workers-sdk#10992

Summary

Deploying a Slidev presentation fails with "infinite loop detected" error due to /* /index.html 200 in _redirects file - user requests better error messaging or automatic handling.

Findings

  • Created: 2025-10-15
  • Updated: 2026-01-16
  • Version: wrangler ^4.43.0 → 4.60.0 (current)
  • Component: API/Backend (not Wrangler)
  • Labels: bug, internal, api
  • Comments: 2

Key Evidence

  • Maintainer clarification: @petebacondarwin confirmed on 2025-10-16 that this validation happens in the Cloudflare API backend, not in Wrangler itself. The internal and api labels reflect this.

  • The wildcard pattern /* /index.html 200 IS intentionally blocked: This rule would cause an infinite loop because:

    1. Request comes in for /foo
    2. Rule matches and rewrites to /index.html
    3. Cloudflare's HTML handling strips /index.html back to /
    4. Request now matches /* again → infinite loop
  • PR #11904 (merged 2026-01-15) only fixes false positives: This PR fixed the validation to allow EXACT path redirects like / /index.html when html_handling is disabled, but the WILDCARD pattern /* /index.html in this issue remains intentionally blocked.

  • Recent user interest: Another user asked about workarounds on 2026-01-16, indicating this is still impacting users.

  • User's actual request: The reporter asks for either:

    1. A better error message telling them to delete the file
    2. Wrangler to handle this automatically (e.g., strip the problematic rule)

Recommendation

Status: KEEP OPEN

Reasoning: This is a valid feature request for improved UX. The current error message from the Cloudflare API is technically accurate but unhelpful for users who didn't create the _redirects file themselves (it was auto-generated by Slidev). Since this requires backend changes (the validation happens in the API), it appropriately has the internal and api labels. The recent user activity shows continued interest.

Action: Keep open and track internally. The issue is correctly labeled for Platform team visibility. Consider adding a note about the workaround (deleting or modifying the _redirects file before deployment).

Suggested Comment

The workaround for this issue is to delete or modify the _redirects file before deploying. If you're using Slidev, you can add a post-build script to remove the problematic rule:

# After build, remove the problematic redirect rule
sed -i '' '/\\/\\*.*\\/index\\.html.*200/d' dist/_redirects

Or simply delete the entire _redirects file if you don't need any custom redirects:

rm dist/_redirects

This issue remains open for tracking improved error messaging or automatic handling on the API side.

Notes & Feedback (0)

No notes yet.

Add Note