feature request- capture ip address onto response object
See original GitHub issuethis is an extension of a request from the requests
library (https://github.com/kennethreitz/requests/issues/2158)
I recently ran into an issue with the various “workarounds”, and have been unable to consistently access an open socket across platforms, environments, or even servers queried (the latter might be from unpredictable timeouts)
it would honestly be great if the remote ip address were cached onto the response object by this library.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:43 (20 by maintainers)
Top Results From Across the Web
How to get a client IP Address in Node.js (6 ways) - Abstract API
1. Retrieve User IP Address From the Request Object's Socket Property. First up, we find the request's IP address with a simple vanilla...
Read more >How to get a user's client IP address in ASP.NET?
i have an application that checks a specific link clicks, and a specific user(by IP) cant click the link more than 5 times...
Read more >255602 - Feature Request: Get IP address from devtools
Hi Chrome team, In our project, we use Webpagetest(www.webpagetest.org) which based on Chrome devtools to detect web page errors and latency ...
Read more >X-Forwarded-For - HTTP - MDN Web Docs
The X-Forwarded-For (XFF) request header is a de-facto standard header for identifying the originating IP address of a client connecting to ...
Read more >Accessing HTTP request and response objects - LoopBack
Return a value or promise for the response so that the framework can serialize it into HTTP responses. For example: import {get} from...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I would also like to +1 on this request. Knowing the IP address is essential for many use-cases. For example, rate-limiting requests per IP address. I don’t think any of the proposed work-arounds really work consitently.
Elaborating off what @sigmavirus24 said - it’s not a workaround. You are creating a second request and obtaining DNS info from that. You may consistently get an ip address off that method, but there is no guarantee the ip address was associated with the first request. When dealing with domains that are fronted by CDNs or Load Balancers, there is a decreased chance the information will match up.