From 5ca8dbac2a160a756ac55b5883d5cf7e72d5d266 Mon Sep 17 00:00:00 2001 From: Samuel Alfageme Sainz Date: Mon, 10 Jan 2022 17:41:26 +0100 Subject: [PATCH] ocproxy: route HEAD requests on the /download endpoint --- ocproxy/api/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocproxy/api/api.go b/ocproxy/api/api.go index 5abbb46..d3de703 100644 --- a/ocproxy/api/api.go +++ b/ocproxy/api/api.go @@ -154,7 +154,7 @@ func (p *proxy) registerRoutes() { // public link routes p.router.HandleFunc("/index.php/s/{token}", p.renderPublicLink).Methods("GET", "POST") - p.router.HandleFunc("/index.php/s/{token}/download", p.plAuth(p.downloadArchivePL)).Methods("GET") + p.router.HandleFunc("/index.php/s/{token}/download", p.plAuth(p.downloadArchivePL)).Methods("GET", "HEAD") p.router.HandleFunc("/index.php/apps/files_sharing/ajax/publicpreview.php", p.tokenAuth(p.getPublicPreview)).Methods("GET") // app routes