feat: derive host from hostname for plain object targets and bracket IPv6 literals#136
feat: derive host from hostname for plain object targets and bracket IPv6 literals#136bjohansebas wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesHost Header Derivation from Hostname and Port
🎯 2 (Simple) | ⏱️ ~8 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
When a proxy target is passed as a plain
ProxyTargetDetailedobject containing onlyhostname/port/protocol(nohost),setupOutgoingleavesoutgoing.hostasundefined. The subsequentchangeOriginbranch then constructs a malformedHostheader:For IPv6 literals (e.g.
hostname: "::1"), the problem is if a consumer tries to derivehostmanually, RFC 3986 §3.2.2 requires brackets in URI host syntax that aren't present in the bare hostname.Unblock: webpack/webpack-dev-server#5663
Summary by CodeRabbit
Bug Fixes
Tests