unjs / httpxy

๐Ÿ”€ A Full-Featured HTTP and WebSocket Proxy for Node.js
Other
194 stars 12 forks source link

fix: add `target` pathname currectly #6

Closed jonasolesen closed 1 year ago

jonasolesen commented 1 year ago

๐Ÿ”— Linked issue

5

โ“ Type of change

๐Ÿ“š Description

Sets the correct target path by using the pathname property on the URL object as described in the linked issue. While the static type of the target object from which I got the pathname is any, it was in fact an URL object during my limited runtime debugging. However, I don't know if this is always the case, so feel free to correct me or come up with a more complete solution ๐Ÿ™‚

๐Ÿ“ Checklist

codecov[bot] commented 1 year ago

Codecov Report

Merging #6 (0e79f05) into main (1ed43da) will decrease coverage by 0.03%. The diff coverage is 66.66%.

@@            Coverage Diff             @@
##             main       #6      +/-   ##
==========================================
- Coverage   65.00%   64.98%   -0.03%     
==========================================
  Files           8        8              
  Lines        1046     1048       +2     
  Branches       73       73              
==========================================
+ Hits          680      681       +1     
- Misses        365      366       +1     
  Partials        1        1              
Files Changed Coverage ฮ”
src/_utils.ts 77.29% <66.66%> (-0.22%) :arrow_down: