mirror of
https://git.hackfreedom.org/mesh.cat/meshname.git
synced 2026-05-22 06:22:32 +00:00
better logging
This commit is contained in:
+5
-4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user