Register WebDAV-specific HTTP methods with chi

Otherwise the router will return 405 before the request makes it to our
middleware.
This commit is contained in:
Conrad Hoffmann 2022-02-22 18:28:37 +01:00
parent 2b6220c1ea
commit 6051fec4c4

View File

@ -29,6 +29,9 @@ func main() {
os.Exit(1) os.Exit(1)
} }
chi.RegisterMethod("PROPFIND")
chi.RegisterMethod("REPORT")
chi.RegisterMethod("MKCOL")
mux := chi.NewRouter() mux := chi.NewRouter()
mux.Use(middleware.Logger) mux.Use(middleware.Logger)