-
Notifications
You must be signed in to change notification settings - Fork 2k
Ignore path and the trailing slash #839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hmmm... the only current way (that I found) to bypass this behavior is rewriting the proxied request path using the callback 'proxyReq' proxy.on('proxyReq', function (proxyReq, req, res, options) {
proxyReq.path = path;
}); |
thanks @mereghost i was looking for just this. to prepend, you can do i.e. |
Thanks @mereghost - just ran into this issue myself, but it didn't surface until dealing with proxying requests with query parameters. Glad to see I'm not going insane. 👍 |
👍 |
👍 |
i need to rewrite the target path too for the exact same reason (the target URL structure does not match the source URL structure). this appended trailing slash breaks the ability to rewrite the target path as a specific resource.. could we remove it and update the docs for |
Fix for #839 (Ignore path and the trailing slash)
Should be resolved by this: #934 |
@niclic should be, thanks :) |
As I need to rewrite the request URL as it does not map perfectly to the applications under the proxy, I've set ignorePath to true.
Then I proceeded to define the target as a full doctored url (a valid URL for my applications), but as in common.js:82 it does not truly ignore the path. It sets it to '/' and them proceeds to append it to target / forward.
Is there any way around that? Is there a better way to do what I need?
The text was updated successfully, but these errors were encountered: