Fix location of pref hosts injection
This commit is contained in:
@@ -105,13 +105,6 @@ func NewHTTPClient(token string, maxRetries int, timeoutSecs int, cfg config.Con
|
||||
}
|
||||
|
||||
func (r *HTTPClient) Do(req *http.Request) (*http.Response, error) {
|
||||
if r.cfg != nil && strings.Contains(req.Host, "download.real-debrid.") {
|
||||
prefHost := r.cfg.GetRandomPreferredHost()
|
||||
if prefHost != "" {
|
||||
req.Host = prefHost
|
||||
req.URL.Host = prefHost
|
||||
}
|
||||
}
|
||||
if r.bearerToken != "" {
|
||||
req.Header.Set("Authorization", "Bearer "+r.bearerToken)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user