From 025440ee8678d8a7bc86ac3bef32ee9b44196c43 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 12 Dec 2017 15:23:32 -0800 Subject: [PATCH] Don't handle content requests in IndexHtmlMapper --- src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs | 8 ++++++-- src/NzbDrone.Api/Frontend/StaticResourceModule.cs | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs b/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs index 8e598e2a1..c6c07cce4 100644 --- a/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs +++ b/src/NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs @@ -49,7 +49,11 @@ namespace NzbDrone.Api.Frontend.Mappers public override bool CanHandle(string resourceUrl) { - return !resourceUrl.Contains(".") && !resourceUrl.StartsWith("/login"); + resourceUrl = resourceUrl.ToLowerInvariant(); + + return !resourceUrl.StartsWith("/content") && + !resourceUrl.Contains(".") && + !resourceUrl.StartsWith("/login"); } public override Response GetResponse(string resourceUrl) @@ -113,4 +117,4 @@ namespace NzbDrone.Api.Frontend.Mappers return _generatedContent; } } -} \ No newline at end of file +} diff --git a/src/NzbDrone.Api/Frontend/StaticResourceModule.cs b/src/NzbDrone.Api/Frontend/StaticResourceModule.cs index f58667c6c..270f48387 100644 --- a/src/NzbDrone.Api/Frontend/StaticResourceModule.cs +++ b/src/NzbDrone.Api/Frontend/StaticResourceModule.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using Nancy.Responses; using NLog; using Nancy; using NzbDrone.Api.Frontend.Mappers;