forked from mirrors/homebox
clean logs
This commit is contained in:
parent
4aee60c242
commit
82269e8a95
1 changed files with 2 additions and 6 deletions
|
@ -15,7 +15,6 @@ import (
|
||||||
v1 "github.com/hay-kot/homebox/backend/app/api/handlers/v1"
|
v1 "github.com/hay-kot/homebox/backend/app/api/handlers/v1"
|
||||||
_ "github.com/hay-kot/homebox/backend/app/api/static/docs"
|
_ "github.com/hay-kot/homebox/backend/app/api/static/docs"
|
||||||
"github.com/hay-kot/homebox/backend/internal/repo"
|
"github.com/hay-kot/homebox/backend/internal/repo"
|
||||||
"github.com/rs/zerolog/log"
|
|
||||||
httpSwagger "github.com/swaggo/http-swagger" // http-swagger middleware
|
httpSwagger "github.com/swaggo/http-swagger" // http-swagger middleware
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -167,14 +166,11 @@ func notFoundHandler() http.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
err := tryRead(public, "public", r.URL.Path, w)
|
err := tryRead(public, "static/public", r.URL.Path, w)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Debug().
|
err = tryRead(public, "static/public", "index.html", w)
|
||||||
Str("path", r.URL.Path).
|
|
||||||
Msg("served from embed not found - serving index.html")
|
|
||||||
err = tryRead(public, "public", "index.html", w)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue