fix(utils): preserve target URL query string in path merging#117
Conversation
When the proxy target URL contains a query string (e.g., `http://example.com/api?key=val`), it was silently dropped because `setupOutgoing` only read `.pathname` from the target URL. Now the target's `.search` is extracted and properly merged with any request query string, using `&` as separator when both are present. Upstream: http-party/node-http-proxy#1334
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #117 +/- ##
==========================================
+ Coverage 96.12% 96.15% +0.02%
==========================================
Files 8 8
Lines 645 650 +5
Branches 243 246 +3
==========================================
+ Hits 620 625 +5
Misses 24 24
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
http://example.com/api?key=val), it was silently dropped becausesetupOutgoingonly used.pathnamefrom the target URL.searchis extracted and properly merged with any request query string, using&as separator when both are presentURLinstances (not string orProxyTargetDetailedtargets), which is correct since string targets are normalized toURLobjects before reachingsetupOutgoingUpstream: http-party/node-http-proxy#1334
Test plan
&)/