mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-05-08 21:14:30 +02:00
Change redirect type to 301 (Perm)
This commit is contained in:
parent
9944484658
commit
1c1144f8c5
2 changed files with 4 additions and 4 deletions
|
|
@ -123,7 +123,7 @@ private object GetDownload(int id)
|
|||
if (indexer.SupportsRedirect && indexerDef.Redirect)
|
||||
{
|
||||
_downloadService.RecordRedirect(unprotectedlLink, id, source, file);
|
||||
return Response.AsRedirect(unprotectedlLink);
|
||||
return Response.AsRedirect(unprotectedlLink, Nancy.Responses.RedirectResponse.RedirectType.Permanent);
|
||||
}
|
||||
|
||||
var downloadBytes = Array.Empty<byte>();
|
||||
|
|
@ -140,7 +140,7 @@ private object GetDownload(int id)
|
|||
&& downloadBytes[6] == 0x3a)
|
||||
{
|
||||
var magnetUrl = Encoding.UTF8.GetString(downloadBytes);
|
||||
return Response.AsRedirect(magnetUrl);
|
||||
return Response.AsRedirect(magnetUrl, Nancy.Responses.RedirectResponse.RedirectType.Permanent);
|
||||
}
|
||||
|
||||
var contentType = indexer.Protocol == DownloadProtocol.Torrent ? "application/x-bittorrent" : "application/x-nzb";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using Nancy;
|
||||
using Nancy;
|
||||
using Nancy.ErrorHandling;
|
||||
using Prowlarr.Http.Extensions;
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ public bool HandlesStatusCode(HttpStatusCode statusCode, NancyContext context)
|
|||
|
||||
public void Handle(HttpStatusCode statusCode, NancyContext context)
|
||||
{
|
||||
if (statusCode == HttpStatusCode.SeeOther || statusCode == HttpStatusCode.OK)
|
||||
if (statusCode == HttpStatusCode.SeeOther || statusCode == HttpStatusCode.MovedPermanently || statusCode == HttpStatusCode.OK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue