mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
@@ -250,8 +250,9 @@ namespace Jackett.Common.Indexers.Definitions.Abstract
|
|||||||
var headers = apiKey != null ? new Dictionary<string, string> { [AuthorizationName] = string.Format(AuthorizationFormat, apiKey.Value) } : null;
|
var headers = apiKey != null ? new Dictionary<string, string> { [AuthorizationName] = string.Format(AuthorizationFormat, apiKey.Value) } : null;
|
||||||
|
|
||||||
var response = await RequestWithCookiesAndRetryAsync(searchUrl, headers: headers);
|
var response = await RequestWithCookiesAndRetryAsync(searchUrl, headers: headers);
|
||||||
|
|
||||||
// we get a redirect in html pages and an error message in json response (api)
|
// we get a redirect in html pages and an error message in json response (api)
|
||||||
if (response.IsRedirect && !useApiKey)
|
if (response.IsRedirect && !useApiKey && configData.CookieItem.Value.IsNullOrWhiteSpace())
|
||||||
{
|
{
|
||||||
// re-login only if API key is not in use.
|
// re-login only if API key is not in use.
|
||||||
await ApplyConfiguration(null);
|
await ApplyConfiguration(null);
|
||||||
|
Reference in New Issue
Block a user