This commit is contained in:
parent
8db19d293d
commit
76697e2682
1 changed files with 2 additions and 2 deletions
4
serve.go
4
serve.go
|
@ -52,14 +52,14 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
slog.Info("GET", "domain", domain, "path", path)
|
||||
|
||||
stat, err := object.Stat()
|
||||
if err != nil {
|
||||
resp := minio.ToErrorResponse(err)
|
||||
if resp.StatusCode == http.StatusNotFound {
|
||||
// TODO: custom 404 page
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
w.Write([]byte("404 not found"))
|
||||
slog.Info("served 404", "domain", domain, "path", path)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue