mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-16 04:13:12 +00:00
chore: tweak linter warning
This commit is contained in:
parent
93bb880e8e
commit
4098ac824e
@ -149,14 +149,14 @@ func (s *FrontendService) createShortcutViewActivity(ctx context.Context, reques
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getReadUserIP(r *http.Request) string {
|
func getReadUserIP(r *http.Request) string {
|
||||||
IPAddress := r.Header.Get("X-Real-Ip")
|
ip := r.Header.Get("X-Real-Ip")
|
||||||
if IPAddress == "" {
|
if ip == "" {
|
||||||
IPAddress = r.Header.Get("X-Forwarded-For")
|
ip = r.Header.Get("X-Forwarded-For")
|
||||||
}
|
}
|
||||||
if IPAddress == "" {
|
if ip == "" {
|
||||||
IPAddress = r.RemoteAddr
|
ip = r.RemoteAddr
|
||||||
}
|
}
|
||||||
return IPAddress
|
return ip
|
||||||
}
|
}
|
||||||
|
|
||||||
func getFileSystem(path string) http.FileSystem {
|
func getFileSystem(path string) http.FileSystem {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user