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:
+4
-3
@@ -39,11 +39,12 @@ func handler(w http.ResponseWriter, r *http.Request) {
|
|||||||
if parsedIP.To4() == nil {
|
if parsedIP.To4() == nil {
|
||||||
if (showIP) {
|
if (showIP) {
|
||||||
w.Write([]byte(ip + "\n"))
|
w.Write([]byte(ip + "\n"))
|
||||||
|
log.Println(ip)
|
||||||
} else {
|
} else {
|
||||||
w.Write([]byte(domainFromIP(parsedIP) + "\n"))
|
domain := domainFromIP(parsedIP)
|
||||||
|
w.Write([]byte(domain + "\n"))
|
||||||
|
log.Println(domain)
|
||||||
}
|
}
|
||||||
log.Println(showIP)
|
|
||||||
log.Println(ip)
|
|
||||||
} else {
|
} else {
|
||||||
// set the response status code to 422
|
// set the response status code to 422
|
||||||
w.WriteHeader(http.StatusUnprocessableEntity)
|
w.WriteHeader(http.StatusUnprocessableEntity)
|
||||||
|
|||||||
Reference in New Issue
Block a user