Skip to content
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

Add support for setting the host in the executable #268

Merged
merged 2 commits into from
Jul 22, 2012

Conversation

shapeshed
Copy link
Contributor

This patch adds support for a host to be set with the node-http-proxy executable. It adds the --host argument meaning you can do

node-http-proxy --config config.json --host 192.168.3.37

My use case is that I have a server that has the following IP addresses assigned to it

  • 192.168.3.5
  • 192.168.3.37

Port 80 on 192.168.3.5 is used by Nginx and I want to use port 80 on 192.168.3.37 for node-http-proxy. Without the patch the executable binds to INADDR_ANY and because Nginx is already listening to port 192.168.3.5:80 I get

Error: listen EADDRINUSE

@coderarity
Copy link
Contributor

sounds useful, nice pull request!

@cronopio
Copy link
Contributor

Can you do just a little style change?, just use a positive verification if (host) {

Thank you!

@cronopio
Copy link
Contributor

ok, looks good to me.

indexzero added a commit that referenced this pull request Jul 22, 2012
Add support for setting the host in the executable
@indexzero indexzero merged commit 54f8371 into http-party:master Jul 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants