better logging
This commit is contained in:
parent
507b16fbd0
commit
7e32f63216
@ -39,11 +39,12 @@ func handler(w http.ResponseWriter, r *http.Request) {
|
||||
if parsedIP.To4() == nil {
|
||||
if (showIP) {
|
||||
w.Write([]byte(ip + "\n"))
|
||||
} else {
|
||||
w.Write([]byte(domainFromIP(parsedIP) + "\n"))
|
||||
}
|
||||
log.Println(showIP)
|
||||
log.Println(ip)
|
||||
} else {
|
||||
domain := domainFromIP(parsedIP)
|
||||
w.Write([]byte(domain + "\n"))
|
||||
log.Println(domain)
|
||||
}
|
||||
} else {
|
||||
// set the response status code to 422
|
||||
w.WriteHeader(http.StatusUnprocessableEntity)
|
||||
|
Loading…
Reference in New Issue
Block a user