diff --git a/RuriLib/Blocks/BlockBypassCF.cs b/RuriLib/Blocks/BlockBypassCF.cs index bc32b77..3ebcf2d 100644 --- a/RuriLib/Blocks/BlockBypassCF.cs +++ b/RuriLib/Blocks/BlockBypassCF.cs @@ -84,6 +84,7 @@ namespace RuriLib } var localUrl = ReplaceValues(url, data); + var uri = new Uri(localUrl); var timeout = data.GlobalSettings.General.RequestTimeout * 1000; @@ -109,7 +110,7 @@ namespace RuriLib CookieContainer cookies = new CookieContainer(); foreach (var cookie in data.Cookies) - cookies.Add(new Cookie(cookie.Key, cookie.Value)); + cookies.Add(new Cookie(cookie.Key, cookie.Value, "/", uri.Host)); if (data.UseProxies) { @@ -148,8 +149,6 @@ namespace RuriLib httpClient.Timeout = TimeSpan.FromMinutes(timeout); httpClient.DefaultRequestHeaders.Add("User-Agent", ReplaceValues(userAgent, data)); - var uri = new Uri(localUrl); - // Solve the CF challenge var result = cf.Solve(httpClient, handler, uri).Result; if (result.Success)