mirror of
https://github.com/sbondCo/Watcharr.git
synced 2026-08-07 07:14:44 +00:00
plex: Stop after 10 redirects
Since the default CheckRedirect has been replaced with ours, we won't get the default protection of erroring after 10 redirects, so i've copied that back in from the std implementation
This commit is contained in:
@@ -345,6 +345,9 @@ var plexHTTPClient = &http.Client{
|
||||
if len(via) == 0 {
|
||||
return nil
|
||||
}
|
||||
if len(via) >= 10 {
|
||||
return errors.New("stopped after 10 redirects")
|
||||
}
|
||||
if req.URL.Host != via[0].URL.Host {
|
||||
req.Header.Del("X-Plex-Token")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user