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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
slog.Info("GET", "domain", domain, "path", path)
|
|
||||||
|
|
||||||
stat, err := object.Stat()
|
stat, err := object.Stat()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
resp := minio.ToErrorResponse(err)
|
resp := minio.ToErrorResponse(err)
|
||||||
if resp.StatusCode == http.StatusNotFound {
|
if resp.StatusCode == http.StatusNotFound {
|
||||||
// TODO: custom 404 page
|
// TODO: custom 404 page
|
||||||
w.WriteHeader(http.StatusNotFound)
|
w.WriteHeader(http.StatusNotFound)
|
||||||
|
w.Write([]byte("404 not found"))
|
||||||
|
slog.Info("served 404", "domain", domain, "path", path)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue