Feat/dashboard (#105)
This commit is contained in:
@@ -2,6 +2,7 @@ package utils
|
||||
|
||||
import "net/http"
|
||||
|
||||
// GetIP helps in getting the IP address from the request
|
||||
func GetIP(r *http.Request) string {
|
||||
IPAddress := r.Header.Get("X-Real-Ip")
|
||||
if IPAddress == "" {
|
||||
@@ -14,6 +15,7 @@ func GetIP(r *http.Request) string {
|
||||
return IPAddress
|
||||
}
|
||||
|
||||
// GetUserAgent helps in getting the user agent from the request
|
||||
func GetUserAgent(r *http.Request) string {
|
||||
return r.UserAgent()
|
||||
}
|
||||
|
Reference in New Issue
Block a user