Skip to content

Commit

Permalink
ipn/ipnlocal: strip origin and referer headers from Taildrive requests
Browse files Browse the repository at this point in the history
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 <percy@tailscale.com>
  • Loading branch information
oxtoacart committed Apr 18, 2024
1 parent 787f8c0 commit 94c0403
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ipn/ipnlocal/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 94c0403

Please sign in to comment.