login-validator: provide latest IP
This commit is contained in:
parent
f3249cc9ed
commit
87599668b9
3 changed files with 19 additions and 13 deletions
|
|
@ -172,7 +172,7 @@ func (l loginChecker) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
func (l loginChecker) registerUser(username, remoteAddr string) error {
|
||||
bts, err := json.Marshal(map[string]interface{}{"login": username})
|
||||
bts, err := json.Marshal(map[string]interface{}{"login": username, "lastip": remoteAddr})
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue