You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think engine.io currently does this, but I want to prevent someone from sending messages to a socket when they don't have the same IP address as the initial request. How can I accomplish this?
The text was updated successfully, but these errors were encountered:
I don't believe that you can do this with vanilla Socket.io, but however, there is a package called ip that is a great source to use for this. You can run a user's IP address by saying 'ip.address()' and it should return the IP address of the user's WiFi router. In the backend such as Node.js, when the user requests to post something, you can compare an incoming IP to one stored in a database. const ip = require('ip') console.log(ip.address())
I don't think engine.io currently does this, but I want to prevent someone from sending messages to a socket when they don't have the same IP address as the initial request. How can I accomplish this?
The text was updated successfully, but these errors were encountered: