You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It turned out to be a bug with httpxy instead, but I figured the reproduction would be obvious enough using the nitro playground with the above configuration rather than forking the repo.
Describe the bug
Using the provided configuration, I assume the expected behavior would be to proxy a request to the /posts path to https://jsonplaceholder.typicode.com/posts, but it seems to be forwarded to just https://jsonplaceholder.typicode.com instead. I (supposedly) fixed the bug by changing the property used when determining the target path from path to pathname as per the URL class API documentation. I'll submit a PR shortly.
Environment
Package version 0.1.2
Node.js 18.16.0
Reproduction
I initially reproduced the error by using nitro and configuring the
devProxy
like so:It turned out to be a bug with httpxy instead, but I figured the reproduction would be obvious enough using the nitro playground with the above configuration rather than forking the repo.
Describe the bug
Using the provided configuration, I assume the expected behavior would be to proxy a request to the
/posts
path tohttps://jsonplaceholder.typicode.com/posts
, but it seems to be forwarded to just https://jsonplaceholder.typicode.com instead. I (supposedly) fixed the bug by changing the property used when determining the target path frompath
topathname
as per the URL class API documentation. I'll submit a PR shortly.Additional context
Another issue reporting the bug: unjs/nitro#1643
Logs
No response
The text was updated successfully, but these errors were encountered: