Closed Netail closed 2 months ago
Can you share your server + proxy configuration? Even better if can provide a reproducible example
Can you share your server + proxy configuration? Even better if can provide a reproducible example
Seems to be only the logging; https://codesandbox.io/p/devbox/gracious-lamport-jfds4x
If you visit the /api or /web path, you see it excludes the port in the logging
@Netail Yeah, looks like it is just the logging. Initially I thought I had an issue with the proxy but that seems to be working as intended.
It also automatically adds a trailing slash to the target which could trigger an infinite loop when the web server has a redirect to the non-trailing slash path
Thanks for reporting and the reproduction. Merged a fix.
Trailing slash is added by the http-proxy
lib.
Should be fixed upstream.
published fix for port issue in 3.0.1-beta.0
Thanks for reporting and the reproduction. Merged a fix.
Trailing slash is added by the
http-proxy
lib. Should be fixed upstream.
Will you make a ticket there or shall I?
Feel free to create a ticket 👍
Feel free to create a ticket 👍
Mhm I doubt it will be picked up, they haven't updated that library for over 4 years now, same for all the security issues
Checks
http-proxy-middleware
.Describe the bug (be clear and concise)
When a target with a port is given, it gets proxied to the domain without port. E.g. when using http://127.0.0.1:3001 as a target, it will proxy to http://127.0.0.1
Step-by-step reproduction instructions
Expected behavior (be clear and concise)
Go to the correct port
How is http-proxy-middleware used in your project?
What http-proxy-middleware configuration are you using?
What OS/version and node/version are you seeing the problem?
Additional context (optional)
No response