From 94c0403104397a1cb07a5f5a3136573ae02b60f3 Mon Sep 17 00:00:00 2001 From: Percy Wegmann Date: Tue, 16 Apr 2024 08:12:47 -0500 Subject: [PATCH] ipn/ipnlocal: strip origin and referer headers from Taildrive requests peerapi does not want these, but rclone includes them. Stripping them out allows rclone to work with Taildrive configured as a WebDAV remote. Updates #cleanup Signed-off-by: Percy Wegmann --- ipn/ipnlocal/local.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index 2509c489b..909a4ac48 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -4833,6 +4833,10 @@ func (dt *driveTransport) RoundTrip(req *http.Request) (resp *http.Response, err req.Body = bw } + // Strip origin and referer headers + req.Header.Del("origin") + req.Header.Del("referer") + defer func() { contentType := "unknown" switch req.Method {