mirror of
https://github.com/aykhans/slash-e.git
synced 2026-11-10 15:41:09 +00:00
chore: tweak linter warning
This commit is contained in:
1 parent
93bb880e8e
commit
4098ac824e
1 file changed
+6
-6
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user