← Back to Dashboard
#5860 Redirects do not work properly in wrangler 3
Recommendation:KEEP OPEN
Difficulty:medium
Reasoning:
Regression from v2; malformed URLs with multiple ports
Suggested Action:
Fix URL construction in local dev
Analysis Report
Issue Review: cloudflare/workers-sdk#5860
Summary
Redirects in local dev mode produce malformed URLs with multiple ports (e.g., localhost:8787:8787:3000).
Findings
- Created: 2024-05-17
- Updated: 2025-10-30
- Version: wrangler 3.56.0 → wrangler 4.61.0
- Component: wrangler (dev)
- Labels: bug
- Comments: 9
Key Evidence
- Reproduction: https://stackblitz.com/edit/stackblitz-starters-vjsh9a
- Two issues reported:
unstable_devfetch throws error when following redirects- Redirect Location header contains malformed URL:
http://localhost:8787:8787:3000/redirected
- Issue tracked separately in #5221 for the malformed URL
- Worked correctly in wrangler v2 (both local and remote mode)
- User @mariusGundersen confirmed "still a problem a year later" (May 2025)
- User @seankovacs confirmed issue persists with wrangler 4.24.0 (July 2025)
Recommendation
Status: KEEP OPEN
Reasoning: This is a regression from wrangler v2 that affects local development with redirects. The malformed URL issue is tracked in #5221. Multiple users confirm the issue persists in recent versions.
Action: Fix the URL construction logic when generating redirect Location headers in local dev mode.
Suggested Comment
N/A - Issue is being tracked, related to #5221.
Notes & Feedback (0)
No notes yet.