Fixed: (Cardigann) Do not log config RSSKey or APIKey

Fixed: (Cardigann) (v3) Pass APIKey as headers
pull/614/head
bakerboy448 3 years ago committed by Qstick
parent 1aa9149866
commit 89a1b0f534

@ -292,7 +292,7 @@ namespace NzbDrone.Core.Indexers.Cardigann
var name = ".Config." + setting.Name;
var value = Settings.ExtraFieldData.GetValueOrDefault(setting.Name, setting.Default);
if (setting.Type != "password" && indexerLogging)
if ((setting.Type != "password" && setting.Name != "apikey" && setting.Name != "rsskey") && indexerLogging)
{
_logger.Trace($"{name} got value {value.ToJson()}");
}
@ -334,7 +334,7 @@ namespace NzbDrone.Core.Indexers.Cardigann
throw new NotSupportedException();
}
if (setting.Type != "password" && indexerLogging)
if (setting.Type != "password" && setting.Name != "apikey" && setting.Name != "rsskey" && indexerLogging)
{
_logger.Debug($"Setting {setting.Name} to {variables[name]}");
}

@ -1067,17 +1067,15 @@ namespace NzbDrone.Core.Indexers.Cardigann
}
}
var request = new CardigannRequest(requestbuilder.Build(), variables, searchPath);
// send HTTP request
if (search.Headers != null)
{
foreach (var header in search.Headers)
{
request.HttpRequest.Headers.Add(header.Key, header.Value[0]);
}
var headers = ParseCustomHeaders(search.Headers, variables);
requestbuilder.SetHeaders(headers ?? new Dictionary<string, string>());
}
var request = new CardigannRequest(requestbuilder.Build(), variables, searchPath);
yield return request;
}
}

Loading…
Cancel
Save