-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Allow proxy to maintain the original target path #693
Conversation
This fix considers the actual target path again (which has been ignored).
@EndangeredMassa One thing I would do though is also support forward requests. Follow the convention we use of |
I updated it, but I'm not really clear on how |
@EndangeredMassa its passed in as a variable so it does an undefined check relying on the And this looks great, thanks! |
Allow proxy to maintain the original target path
Im realizing that this shouldnt necessarily be default behavior. This should be configured in some way. @EndangeredMassa naming suggestions? Seems like a boolean option is the best way to deal with this. |
Hrm. I expect this behavior to be default. In my mind, adding a url that includes a path in the |
@EndangeredMassa Yea that's understandable. Im guessing our case at nodejitsu is the special case as it is more specific to how couchdb interprets the request. We currently proxy to couchdb instances with |
It should not be default unless a major version update, since this breaks backwards compatibility... we ended with such a problem in redbird, that already appends the target path if necessary: https://github.com/OptimalBits/redbird |
@manast it does not break backwards compatibility. It introduces a new feature that allows for the path to be part of the |
@indexzero in my opinion that is not really the case, because even if not supported before, if you happen to have a path in the target, the new behaviour would break things. It is a bit in the grey zone, but I think the safest bet would have been to have it disabled by default, users wanting to use the new feature would have been forced to enable it manually. For instance, before this feature existed, many people created its own third party code for adding it, this code usually left the target with the complete path since it was not necessary to parse it just to remove it. |
We do take backwards compatibility very seriously, and I will say it again: this is backwards compatible. Objects that If you would like to update the documentation about this point I would greatly appreciate it. |
This completes the work started in: #645