1
0
mirror of https://github.com/umputun/reproxy.git synced 2025-02-16 18:34:30 +02:00

logging rejected IPs

This commit is contained in:
Umputun 2023-11-26 18:30:14 -06:00
parent bddb144f60
commit 197c8d9db3

View File

@ -2,6 +2,7 @@ package proxy
import (
"bytes"
"log"
"net"
"net/http"
"strings"
@ -50,6 +51,7 @@ func (o *OnlyFrom) Handler(next http.Handler) http.Handler {
return
}
w.WriteHeader(http.StatusForbidden)
log.Printf("[INFO] ip %q rejected", realIP)
}
return http.HandlerFunc(fn)
}