From 778e9f9bccbcfe53eb29de7a0a96f2f10417085d Mon Sep 17 00:00:00 2001 From: zyxkad Date: Wed, 7 Feb 2024 20:44:10 -0700 Subject: [PATCH] forgot to set auth when serving --- storage_webdav.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage_webdav.go b/storage_webdav.go index 993a5d6f..33558500 100644 --- a/storage_webdav.go +++ b/storage_webdav.go @@ -224,6 +224,7 @@ func (s *WebDavStorage) ServeDownload(rw http.ResponseWriter, req *http.Request, if err != nil { return 0, err } + tgReq.SetBasicAuth(s.opt.GetUsername(), s.opt.GetPassword()) rangeH := req.Header.Get("Range") if rangeH != "" { tgReq.Header.Set("Range", rangeH) @@ -282,6 +283,7 @@ func (s *WebDavStorage) ServeMeasure(rw http.ResponseWriter, req *http.Request, if err != nil { return err } + tgReq.SetBasicAuth(s.opt.GetUsername(), s.opt.GetPassword()) rangeH := req.Header.Get("Range") if rangeH != "" { tgReq.Header.Set("Range", rangeH)