-
Notifications
You must be signed in to change notification settings - Fork 280
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
Custom resolver, host and url rewriting #61
Comments
Did you try to return an object with url (the target host), and path 'folder' ? |
Hi, Actually, no, I didn't. original request url I getting the following message from the proxy
|
After a quick look to the code: https://github.com/OptimalBits/redbird/blob/master/lib/proxy.js The error came from _getTarget, line 448: Which is due, I think, of the return condition from resolve, line 401: There is also in line 472 and 475 from _getTarget function:
Which I think, does not allow to do what I want any way, rewrite the url and the path in the same time ? |
I will have to look deeper into it, but if it is not possible to do it then we need to rethink the custom resolvers design. |
Is this limitation still valid? I'm evaluating reverse proxies and that's something I would need. Overall, GREAT project! |
backrunner@7ae14a9 In the In my modification, if the custom resolver return a object that contains a property named |
Hello,
I would like to defined a custom resolver to wildcard domain routing and do some redirection.
Configuration
Code
But custom revoler only return host i guess ? So I can not "rewrite" the url.
The above code does not work as expected:
10.0.0.42/foo/folder -> http://something:9100/folder/foo/folder
Because I it return
http://something:9100/folder
and the original url is added at the end/foo/folder
However it is possible to "rewrite" the url with proxy.register, but not the host.
proxy.register("10.0.0.42/foo", "http://something:9100")
It do the url "rewriting" but only works when we access to 10.0.0.42, if there is another ip to connect the server, like 172.17.0.5, it does not works.
Is there any way to do this ? Did I miss something ? May be I have to return from custom_resolver another type, like an object, (an array does not works) ? Is there a maner to combine the both solution ?
King regards,
Arnaud
The text was updated successfully, but these errors were encountered: