|
|
@@ -32,7 +32,11 @@ func SaveLoginInfoToDb(r *http.Request, u *User) { |
|
|
|
|
|
|
|
func getIP(r *http.Request) string { |
|
|
|
headerjson, _ := json.Marshal(r.Header) |
|
|
|
log.Info("json=" + string(headerjson)) |
|
|
|
log.Info("header json=" + string(headerjson)) |
|
|
|
|
|
|
|
reqjson, _ := json.Marshal(r) |
|
|
|
log.Info("request json=" + string(reqjson)) |
|
|
|
|
|
|
|
forwarded := r.Header.Get("X-FORWARDED-FOR") |
|
|
|
if forwarded != "" { |
|
|
|
return forwarded |
|
|
|