Skip to content

Commit

Permalink
forgot to set auth when serving
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed Feb 8, 2024
1 parent e93b6eb commit 778e9f9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions storage_webdav.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 778e9f9

Please sign in to comment.