mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-05-08 19:22:57 +00:00
fixes: requiring a trailing slash (#669)
This commit is contained in:
parent
72e74d421c
commit
604487920d
@ -19,6 +19,11 @@ func NewHandler(storage *storage.Storage, server *settings.Server) (http.Handler
|
|||||||
r := mux.NewRouter()
|
r := mux.NewRouter()
|
||||||
index, static := getStaticHandlers(storage, server)
|
index, static := getStaticHandlers(storage, server)
|
||||||
|
|
||||||
|
// NOTE: This fixes the issue where it would redirect if people did not put a
|
||||||
|
// trailing slash in the end. I hate this decision since this allows some awful
|
||||||
|
// URLs https://www.gorillatoolkit.org/pkg/mux#Router.SkipClean
|
||||||
|
r = r.SkipClean(true)
|
||||||
|
|
||||||
monkey := func(fn handleFunc, prefix string) http.Handler {
|
monkey := func(fn handleFunc, prefix string) http.Handler {
|
||||||
return handle(fn, prefix, storage, server)
|
return handle(fn, prefix, storage, server)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user