From 6051fec4c4c41020b27758f76206e1b95c297c13 Mon Sep 17 00:00:00 2001 From: Conrad Hoffmann Date: Tue, 22 Feb 2022 18:28:37 +0100 Subject: [PATCH] Register WebDAV-specific HTTP methods with chi Otherwise the router will return 405 before the request makes it to our middleware. --- cmd/tokidoki/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/tokidoki/main.go b/cmd/tokidoki/main.go index aa5c560..23018b9 100644 --- a/cmd/tokidoki/main.go +++ b/cmd/tokidoki/main.go @@ -29,6 +29,9 @@ func main() { os.Exit(1) } + chi.RegisterMethod("PROPFIND") + chi.RegisterMethod("REPORT") + chi.RegisterMethod("MKCOL") mux := chi.NewRouter() mux.Use(middleware.Logger)