Home > Back-end >  Verify the login IP login, how to get in another controller, and then save it? The session? Isn'
Verify the login IP login, how to get in another controller, and then save it? The session? Isn'

Time:12-04

He looks at his login method can get the IP, but there is another way to deposit information need in the current login IP, if add a save session when landing, and then put out the method of information, will not too safe

CodePudding user response:

Take the request again

CodePudding user response:

refer to the original poster is in the wrong line of reply:
he see his login method can get the IP inside, but there is another way to deposit information needs to be deposited in the current login IP, if add a save session when landing, and then put out the method of information, will not too safe


IP is passed to the business method can be inside the

You see how he did get IP, you also get IP in the controller, and then pass the IP

CodePudding user response:

Each time from the request, the IP doesn't have to save to the session, anyway is memory operations from the request, there is no performance issues, so that even cache do? Unless you are to the user login IP,

Behind the login IP and operation of IP is inconsistent may exist, because of the HTTP protocol session is implemented based on a cookie, is to change the IP and has nothing to do,
  • Related