serve proper 404 if favicon.ico not configured
This commit is contained in:
parent
a9a6b51a3f
commit
90fedf86d9
@ -112,9 +112,13 @@ func (this *WikiServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write(content)
|
||||
return
|
||||
|
||||
} else if remainingPath == "favicon.ico" && len(this.opts.FaviconFilePath) > 0 {
|
||||
w.Header().Set("Content-Type", "image/x-icon")
|
||||
http.ServeFile(w, r, this.opts.FaviconFilePath)
|
||||
} else if remainingPath == "favicon.ico" {
|
||||
if len(this.opts.FaviconFilePath) > 0 {
|
||||
w.Header().Set("Content-Type", "image/x-icon")
|
||||
http.ServeFile(w, r, this.opts.FaviconFilePath)
|
||||
} else {
|
||||
http.Error(w, "Not found", 404)
|
||||
}
|
||||
return
|
||||
|
||||
} else if remainingPath == "download-database" {
|
||||
|
Loading…
Reference in New Issue
Block a user