mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-16 11:41:39 +00:00
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>
This commit is contained in:
parent
787f8c08ec
commit
94c0403104
@ -4833,6 +4833,10 @@ func (dt *driveTransport) RoundTrip(req *http.Request) (resp *http.Response, err
|
|||||||
req.Body = bw
|
req.Body = bw
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Strip origin and referer headers
|
||||||
|
req.Header.Del("origin")
|
||||||
|
req.Header.Del("referer")
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
contentType := "unknown"
|
contentType := "unknown"
|
||||||
switch req.Method {
|
switch req.Method {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user