Feat/dashboard (#105)

This commit is contained in:
Lakhan Samani
2022-01-17 11:32:13 +05:30
committed by GitHub
parent 7ce96367a3
commit f1b4141367
120 changed files with 3381 additions and 3044 deletions

View File

@@ -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()
}