flounder

A simple gemini site builder
Log | Files | Refs | README | LICENSE

commit b60b64a17d3a924e44fd4dafb511c1f5c4adc5d7
parent dd2cb2f7596b5de8a4102002eb572c55a41906fe
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Thu, 21 Jan 2021 20:39:43 -0800

fix IP forward address w caddy

Diffstat:
Madmin.go | 2+-
Mlog.go | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/admin.go b/admin.go @@ -42,7 +42,7 @@ func runAdminCommand() { username := args[2] newUsername := args[3] err = renameUser(username, newUsername) - case "set-password": // TODO FIX -- broken atm + case "set-password": username := args[2] fmt.Print("Enter New Password: ") bytePassword, err := terminal.ReadPassword(int(syscall.Stdin)) diff --git a/log.go b/log.go @@ -42,7 +42,7 @@ func buildCommonLogLine(req *http.Request, url url.URL, ts time.Time, status int } // Get forwarded IP address - ipAddr := req.Header.Get("X-Real-IP") + ipAddr := req.Header.Get("X-Forwarded-For") // TODO make so it works with many servers if ipAddr == "" { ipAddr = req.RemoteAddr }