-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use of client_ip is not thread safe #11
Comments
Hey, sounds good. I'm gearing up for a refactor too (gonna start a new I'm not sure what kind of use case will require changing the client ip But I guess if we are gonna use it as some sort of saas that performs What do you think? On Monday, March 2, 2015, Kyle Drake notifications@github.com wrote:
|
My interpretation of "IP address of the client accessing your application (End-user IP address)" is that you need to provide the IP address for each user request, though I'm not sure if they enforce that, nor do I understand why this information would be neccessary. I could certainly just provide the IP address of the server doing the work, but that does not seem to be the spirit of this. This is also information they could easily acquire on their own end by looking at the IP doing the request. |
As I understand it,
client_ip
is supposed to be the ip address of the end user. I'm not exactly sure why Namecheap requires this (it's a bit of a security concern), but if it must be configured per end user as I understand it, configuring it globally for the entire Namecheap module will prevent it from being thread safe:I think that it should be supplied to an instantiated object, such as this sinatra psuedocode:
In a threaded environment (which is the default for sinatra using most web browsers), the client_ip would be squashed by other simultaneous requests as multiple requests came in concurrently.
Not sure what the best way to approach this is, except to refactor to work as shown above.
The text was updated successfully, but these errors were encountered: