diff --git a/cmd/version.go b/cmd/version.go index 93e3986..880936d 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -10,7 +10,7 @@ import ( "github.com/spf13/cobra" ) -var Version = "0.28.0" +var Version = "0.28.1" func init() { rootCmd.AddCommand(versionCmd) diff --git a/cmd/web.go b/cmd/web.go index 48b1c6a..1756b2d 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -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 != "" {