mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Make sure the remote address is populated even when using unix socket
This commit is contained in:
parent
1315282c7f
commit
9f85f67031
2 changed files with 25 additions and 0 deletions
|
@ -34,5 +34,10 @@ func FindClientIP(r *http.Request) string {
|
|||
remoteIP = r.RemoteAddr
|
||||
}
|
||||
|
||||
// When listening on a Unix socket, RemoteAddr is empty.
|
||||
if remoteIP == "" {
|
||||
remoteIP = "127.0.0.1"
|
||||
}
|
||||
|
||||
return remoteIP
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue