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 <percy@tailscale.com>
pull/11807/head
Percy Wegmann 7 months ago committed by Percy Wegmann
parent 787f8c08ec
commit 94c0403104

@ -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 {

Loading…
Cancel
Save