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

[Question] Is it possible to get the ip of the client #1141

Closed
rosehgal opened this issue Feb 20, 2017 · 3 comments
Closed

[Question] Is it possible to get the ip of the client #1141

rosehgal opened this issue Feb 20, 2017 · 3 comments

Comments

@rosehgal
Copy link

How do i get the client IP via this proxy? Is it possible even?

@andreshm
Copy link

were you able to find out? I'm wondering the same thing.

@uptownhr
Copy link

uptownhr commented Dec 6, 2017

same here

@rosehgal
Copy link
Author

rosehgal commented Dec 7, 2017

Yeah, you can follow my code to do this.

     var httpProxy = require("http-proxy");
     var proxy = httpProxy.createServer({target:'http://server:80'});
     proxy.on('proxyReq',function(proxyReq, req, res){
            var address = LOG_DIR+req.socket.remoteAddress;
        }
    );

@rosehgal rosehgal closed this as completed Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants