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 {
|
||||
IPAddress := r.Header.Get("X-Real-Ip")
|
||||
if IPAddress == "" {
|
||||
IPAddress = r.Header.Get("X-Forwarded-For")
|
||||
ip := r.Header.Get("X-Real-Ip")
|
||||
if ip == "" {
|
||||
ip = r.Header.Get("X-Forwarded-For")
|
||||
}
|
||||
if IPAddress == "" {
|
||||
IPAddress = r.RemoteAddr
|
||||
if ip == "" {
|
||||
ip = r.RemoteAddr
|
||||
}
|
||||
return IPAddress
|
||||
return ip
|
||||
}
|
||||
|
||||
func getFileSystem(path string) http.FileSystem {
|
||||
|
Loading…
x
Reference in New Issue
Block a user