diff --git a/src/Prowlarr.Api.V1/Indexers/IndexerModule.cs b/src/Prowlarr.Api.V1/Indexers/IndexerModule.cs index 9f3adb505..a6f1fdfd4 100644 --- a/src/Prowlarr.Api.V1/Indexers/IndexerModule.cs +++ b/src/Prowlarr.Api.V1/Indexers/IndexerModule.cs @@ -123,7 +123,7 @@ namespace Prowlarr.Api.V1.Indexers 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(); @@ -140,7 +140,7 @@ namespace Prowlarr.Api.V1.Indexers && 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"; diff --git a/src/Prowlarr.Http/ErrorManagement/ErrorHandler.cs b/src/Prowlarr.Http/ErrorManagement/ErrorHandler.cs index 5863c5dfb..cade63fe1 100644 --- a/src/Prowlarr.Http/ErrorManagement/ErrorHandler.cs +++ b/src/Prowlarr.Http/ErrorManagement/ErrorHandler.cs @@ -1,4 +1,4 @@ -using Nancy; +using Nancy; using Nancy.ErrorHandling; using Prowlarr.Http.Extensions; @@ -13,7 +13,7 @@ namespace Prowlarr.Http.ErrorManagement 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; }