Fix ipv6 replacement

This commit is contained in:
Ben Sarmiento
2024-01-26 22:33:13 +01:00
parent 1e1ec9d767
commit 979151d2de
5 changed files with 5 additions and 5 deletions

View File

@@ -178,7 +178,7 @@ func (r *HTTPClient) Do(req *http.Request) (*http.Response, error) {
}
func (r *HTTPClient) replaceHostIfNeeded(req *http.Request) {
if !r.ensureIPv6Host && !r.cfg.ShouldForceIPv6() || !strings.HasSuffix(req.Host, "download.real-debrid.com") {
if strings.HasSuffix(req.Host, "download.real-debrid.cloud") || !r.ensureIPv6Host || !r.cfg.ShouldForceIPv6() {
return
}
// get subdomain of req.Host