Handle preferred hosts in redirects too
This commit is contained in:
@@ -23,8 +23,8 @@ type HTTPClient struct {
|
||||
func (r *HTTPClient) Do(req *http.Request) (*http.Response, error) {
|
||||
if r.config != nil && strings.Contains(req.Host, "download.real-debrid.") {
|
||||
prefHost := r.config.GetRandomPreferredHost()
|
||||
if host := prefHost; host != "" {
|
||||
req.Host = r.config.GetRandomPreferredHost()
|
||||
if prefHost != "" {
|
||||
req.Host = prefHost
|
||||
}
|
||||
}
|
||||
if r.BearerToken != "" {
|
||||
|
||||
Reference in New Issue
Block a user