Fix remote IP, fix title
This commit is contained in:
1 parent
284e4e7080
commit
b5630d2af7
6 files changed
+39
-14
No files matched your search
@@ -2,7 +2,6 @@ package rest
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
|
||||
"goAuth/internal/auth"
|
||||
@@ -27,14 +26,6 @@ func sessionFromRequest(r *http.Request) *auth.Session {
|
||||
return session
|
||||
}
|
||||
|
||||
func clientAddress(r *http.Request) string {
|
||||
host, _, err := net.SplitHostPort(r.RemoteAddr)
|
||||
if err != nil {
|
||||
return r.RemoteAddr
|
||||
}
|
||||
return host
|
||||
}
|
||||
|
||||
func formatUserId(id int64) string {
|
||||
return fmt.Sprintf("user-%d", id)
|
||||
}
|
||||
Reference in new issue
Block a user