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 |
|
hi @pio |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #136 +/- ##
==========================================
+ Coverage 94.91% 94.93% +0.02%
==========================================
Files 8 8
Lines 786 790 +4
Branches 320 324 +4
==========================================
+ Hits 746 750 +4
Misses 35 35
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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