added favicon 404

This commit is contained in:
ston1th 2019-08-03 23:38:17 +02:00
commit dae45986f6
3 changed files with 9 additions and 0 deletions

View file

@ -53,6 +53,9 @@ func main() {
log.Printf("%s %s %s", r.RemoteAddr, r.Method, r.URL) log.Printf("%s %s %s", r.RemoteAddr, r.Method, r.URL)
fmt.Fprintf(w, "api: ok") fmt.Fprintf(w, "api: ok")
}) })
http.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
})
s := &http.Server{ s := &http.Server{
ReadTimeout: 5 * time.Second, ReadTimeout: 5 * time.Second,
WriteTimeout: 10 * time.Second, WriteTimeout: 10 * time.Second,

View file

@ -49,6 +49,9 @@ func main() {
log.Printf("%s %s %s", r.RemoteAddr, r.Method, r.URL) log.Printf("%s %s %s", r.RemoteAddr, r.Method, r.URL)
fmt.Fprintf(w, "db: ok") fmt.Fprintf(w, "db: ok")
}) })
http.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
})
s := &http.Server{ s := &http.Server{
ReadTimeout: 5 * time.Second, ReadTimeout: 5 * time.Second,
WriteTimeout: 10 * time.Second, WriteTimeout: 10 * time.Second,

View file

@ -63,6 +63,9 @@ func main() {
dbUrl, dbBody, dbUrl, dbBody,
apiUrl, apiBody) apiUrl, apiBody)
}) })
http.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
})
s := &http.Server{ s := &http.Server{
ReadTimeout: 5 * time.Second, ReadTimeout: 5 * time.Second,
WriteTimeout: 10 * time.Second, WriteTimeout: 10 * time.Second,