mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-30 18:29:16 +02:00
Merge branch 'main' into user-account
This commit is contained in:
commit
7a507505aa
8 changed files with 1038 additions and 782 deletions
server
|
@ -101,7 +101,9 @@ func extractIPAddress(r *http.Request, behindProxy bool) netip.Addr {
|
|||
ip, err = netip.ParseAddr(remoteAddr)
|
||||
if err != nil {
|
||||
ip = netip.IPv4Unspecified()
|
||||
log.Warn("unable to parse IP (%s), new visitor with unspecified IP (0.0.0.0) created %s", remoteAddr, err)
|
||||
if remoteAddr != "@" || !behindProxy { // RemoteAddr is @ when unix socket is used
|
||||
log.Warn("unable to parse IP (%s), new visitor with unspecified IP (0.0.0.0) created %s", remoteAddr, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
if behindProxy && strings.TrimSpace(r.Header.Get("X-Forwarded-For")) != "" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue