Skip to content

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

@Ankcorn

Description

@Ankcorn

What versions & operating system are you using?

Environment:

  • macOS
  • wrangler: ^4.43.0
  • slidev (sli.dev)

Please provide a link to a minimal reproduction

https://github.com/Ankcorn/mcp-tips

Describe the Bug

Description:
When deploying a slidev presentation using wrangler deploy, the deployment fails with a Cloudflare API error indicating an infinite redirect loop in the _redirects file.

Root Cause:
The _redirects file generated by slidev contains an invalid rewrite rule:

/*    /index.html   200

I would expect the error message to tell me to delete this file or just handle deploying it

Please provide any relevant error logs

[ERROR] A request to the Cloudflare API (/accounts/92a369ba0c773e307fbf9b8814730c09/workers/scripts/mcp-tips/versions) failed.

Invalid _redirects configuration:
Line 1: Infinite loop detected in this rule. This would cause a redirect to strip .html or
/index and end up triggering this rule again. [code: 10021]

Metadata

Metadata

Assignees

No one assigned

    Labels

    apibugSomething that isn't workinginternalRequires support from the Cloudflare Platform

    Type

    Projects

    Status

    Other

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions