Accidentally referred to response headers, not request headers, when determining IP address
This commit is contained in:
parent
3d560ef770
commit
af9def38ba
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var Version = "0.28.0"
|
||||
var Version = "0.28.1"
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(versionCmd)
|
||||
|
|
|
@ -294,8 +294,8 @@ func serveStaticFile(w http.ResponseWriter, r *http.Request, paths []string) err
|
|||
|
||||
if Verbose {
|
||||
remoteAddr := ""
|
||||
cfIP := w.Header().Get("Cf-Connecting-Ip")
|
||||
xRealIp := w.Header().Get("X-Real-Ip")
|
||||
cfIP := r.Header.Get("Cf-Connecting-Ip")
|
||||
xRealIp := r.Header.Get("X-Real-Ip")
|
||||
if cfIP != "" {
|
||||
remoteAddr = cfIP
|
||||
} else if xRealIp != "" {
|
||||
|
|
Loading…
Reference in New Issue