From 405981581195297b539e5bdbc13a4ceee9c2eef0 Mon Sep 17 00:00:00 2001 From: kaso17 Date: Wed, 27 Dec 2017 19:05:19 +0100 Subject: [PATCH] ignore cloudflare ob cookies --- src/Jackett.Common/Indexers/BaseIndexer.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Jackett.Common/Indexers/BaseIndexer.cs b/src/Jackett.Common/Indexers/BaseIndexer.cs index 562284e74..7113fd059 100644 --- a/src/Jackett.Common/Indexers/BaseIndexer.cs +++ b/src/Jackett.Common/Indexers/BaseIndexer.cs @@ -520,7 +520,9 @@ namespace Jackett.Indexers if (matches.Groups.Count > 2) cookieDIctionary[matches.Groups[1].Value] = matches.Groups[2].Value; matches = matches.NextMatch(); } - return string.Join("; ", cookieDIctionary.Select(kv => kv.Key.ToString() + "=" + kv.Value.ToString()).ToArray()); + return string.Join("; ", cookieDIctionary + .Where(kv => kv.Key != "cf_use_ob" && kv.Key != "cf_ob_info") // These cookies are causing BadGateway errors, so we drop them, see issue #2306 + .Select(kv => kv.Key.ToString() + "=" + kv.Value.ToString()).ToArray()); } // Update CookieHeader with new cookies and save the config if something changed (e.g. a new CloudFlare clearance cookie was issued)