Skip to content

Commit

Permalink
refactor: add better logging for whitelists
Browse files Browse the repository at this point in the history
  • Loading branch information
d-Rickyy-b committed Feb 17, 2024
1 parent 906d68d commit ef6a94f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/web/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ func IPWhitelist(whitelist []string) func(next http.Handler) http.Handler {
continue
}

log.Println(*ipNet)
cidrList = append(cidrList, *ipNet)
}

log.Println("IP whitelist: ", ipList)
log.Println("CIDR whitelist: ", cidrList)

return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// if the whitelist is empty, just continue
Expand Down

0 comments on commit ef6a94f

Please sign in to comment.