Skip to content

Commit ee3e828

Browse files
committed
fix: improve logRequest IP logging
1 parent 1c4a785 commit ee3e828

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service/proxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func getHostNonWww(host string) string {
6868

6969
func logRequest(clientIp string, r *http.Request) {
7070
if !strings.Contains(r.UserAgent(), "Uptime-Kuma") {
71-
fmt.Printf("handleRequest: %s\t%s\t%s\t%s\t%s\n", r.RemoteAddr, r.Method, r.Host, r.RequestURI, r.UserAgent())
71+
fmt.Printf("handleRequest: %s\t%s\t%s\t%s\t%s\t%s\n", clientIp, r.Method, r.Host, r.RequestURI, r.UserAgent(), r.RemoteAddr)
7272
record := object.Record{
7373
Owner: "admin",
7474
CreatedTime: util.GetCurrentTime(),

0 commit comments

Comments
 (0)