Fixed: Allow redirect and set referer for Anthelion

pull/255/head
Qstick 3 years ago
parent 80ec66514e
commit 8e597c8179

@ -52,7 +52,8 @@ namespace NzbDrone.Core.Indexers.Definitions
{ {
var requestBuilder = new HttpRequestBuilder(LoginUrl) var requestBuilder = new HttpRequestBuilder(LoginUrl)
{ {
LogResponseContent = true LogResponseContent = true,
AllowAutoRedirect = true
}; };
requestBuilder.Method = HttpMethod.POST; requestBuilder.Method = HttpMethod.POST;
@ -69,6 +70,13 @@ namespace NzbDrone.Core.Indexers.Definitions
.SetHeader("Content-Type", "multipart/form-data") .SetHeader("Content-Type", "multipart/form-data")
.Build(); .Build();
var headers = new NameValueCollection
{
{ "Referer", LoginUrl }
};
authLoginRequest.Headers.Add(headers);
var response = await ExecuteAuth(authLoginRequest); var response = await ExecuteAuth(authLoginRequest);
if (!response.Content.Contains("logout.php")) if (!response.Content.Contains("logout.php"))

Loading…
Cancel
Save