Compare commits
1 Commits
0e871220de
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c4d4dcd1bf |
6
main.go
6
main.go
@@ -17,11 +17,7 @@ func main() {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
// error handling for common probes
|
||||
if r.Host == "" {
|
||||
http.Error(w, "", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
log.Printf("Received request from %s, Host: %s", r.RemoteAddr, r.Host)
|
||||
|
||||
// error handling for common probes
|
||||
if r.URL.Path != "/" {
|
||||
|
||||
Reference in New Issue
Block a user