flounder

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

commit 45b3905418e922b12639ff76f0d42a7d453ad02b
parent fd90cb7259cd85bf9321f577cf085e434d4cbfa6
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sat,  2 Jan 2021 10:21:19 -0800

fix forwarded IP

Diffstat:
Mlog.go | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/log.go b/log.go @@ -37,9 +37,9 @@ func buildCommonLogLine(req *http.Request, url url.URL, ts time.Time, status int ipAddr = req.RemoteAddr } - host, _, err := net.SplitHostPort(req.RemoteAddr) + host, _, err := net.SplitHostPort(ipAddr) if err != nil { - host = req.RemoteAddr + host = ipAddr } uri := req.RequestURI