-
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
host sub domain #217
Comments
About the request headers: you have access to the req object passed into the |
It works for me on master - what domain are you trying to use? Note that it will use the 'Host' header from the original request. (Hopefully this will change soon, so you can just specify "changeOrigin: true" to fix things.) |
I see! Let me look into it. |
It seems like it's not related to #150. |
Oh - you're not using the "http" in your var httpProxy = require('http-proxy');
httpProxy.createServer(function (req, res, proxy) {
var options = {
host: "mydomain.cloudant.com",
port: 5984
};
proxy.proxyRequest(req, res, options);
}).listen(5000); (which works for me) |
i am using host: "mydomain.cloudant.com/mydb" and it is not working if a try a different couchdb host like iriscouch (host: "mydomain.iriscouch.com"), i get back a "Host not found" if i qualify it like host:"mydomain.iriscouch.com/mydb" i get the same as the first problem |
Looks like this should be fixed from the PR from @coderarity |
@indexzero I'm not quite sure how this was fixed, I still can't get a similar proxy usecase to run:
|
FYI, here is how I was able to get this working: var proxy = new httpProxy.RoutingProxy({changeOrigin : true});
var routingOptions = {
host : 'mydomain.cloudant.com',
port : 80
}; Non-obvious, but it works. |
Anyone point me to how to fix up mine? I am running multiple domains off one machine using this proxy, one domain with SSL, the others without. Can you tell me what I need to do to get the 'status' subdomain working? Thanks! |
This simple proxy server
if i change host:"localhost" to host:"subdomain.domainoninternet.com"
if get 'Host not found' back, is this the "www . host" issue? #150
on a related question, is there a way to set request headers before they are sent to destination? (to set Auth headers from the server)
thank you
The text was updated successfully, but these errors were encountered: