J
J
jealrockone2016-06-03 14:38:17
Ruby on Rails
jealrockone, 2016-06-03 14:38:17

Is it possible to use the client's IP when sending requests using the Net::HTTP class?

Hello, I am writing a site on Rails, I need to send requests to third-party services, is it possible to use the client IP, not the server, when sending them? I use the Net::HTTP class, maybe there is another solution, which one? tell

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rou1997, 2016-06-03
@Rou1997

Of course, technically, you can’t just take and “use” someone else’s IP, otherwise there would be no point in proxies and anonymizers, and Ruby and the HTTP protocol have nothing to do with it, addressing “lies” much deeper, not even in TCP, but at the level protocol, which is called IP, so that a request is sent from the client's IP address, it must be done on the client, that is, either JavaScript (but it has a cross-domain policy), or Flash (exploits are possible), or make a program that the user downloads and installs, a browser extension, etc.)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question