1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

webdav: add Referer header to fix problems with WAFs - fixes #3868

This commit is contained in:
Nick Craig-Wood
2020-01-11 17:22:06 +00:00
parent ede36b001b
commit e4d2d228bd

View File

@@ -358,6 +358,7 @@ func NewFs(name, root string, m configmap.Mapper) (fs.Fs, error) {
if err != nil {
return nil, err
}
f.srv.SetHeader("Referer", u.String())
if root != "" && !rootIsDir {
// Check to see if the root actually an existing file