Monday 15 July 2013

Get client's ip at user creation in Meteor -


I am creating a custom sign-in / sign-up in the meteor because I have to check the email format more importantly To add a recaptcha to the sign-up form, which requires the client's IP.

So I am planning to verify CAPTCHA in Accounts.validateNewUser , but I do not know how to get the client's IP here I have read how to do this It's not like it's where I want to. I checked Meteor.default_server.sessions, which includes all sessions / sockets on the server. I have information about headers, IPs of all sockets, interesting things in every one:

  Path name: "/ sockjs / 375 / ibmrlwb2 / xhr" prefix: "/ sockjs" Protocol: "xhr-polling" remote address: "127.0.0.1" remote port: 42009   

but Without knowing what the current socket is, I can not determine what is the current IP

I present on the server How Nurod URLs know? With this I can examine the client's IP with all the sockets on the server to guess.

Or just how can I get the client's IP on the server?

I am maintaining the package mentioned in the second answer.

Along with the meteor of the recent / upcoming edition, together with the fact that today it is merged with the devel branch, you can use it directly or directly Which we will add to the user-status package.

Feel free to open a bridge request if you need anything.

No comments:

Post a Comment