Skip to content

Commit

Permalink
Log IP on country block
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulexus committed Jul 1, 2024
1 parent d12cc02 commit 5ea0a4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (p Plugin) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
return
}
if !allowed {
log.Printf("%s: [%s %s %s] blocked request from %s", p.name, req.Host, req.Method, req.URL.Path, country)
log.Printf("%s: [%s %s %s] blocked request from %s (%s)", p.name, req.Host, req.Method, req.URL.Path, country, ip)
rw.WriteHeader(p.disallowedStatusCode)
return
}
Expand Down

0 comments on commit 5ea0a4b

Please sign in to comment.