From 8f98fb6c4ee278e6d028e527634df6ee82e7fac9 Mon Sep 17 00:00:00 2001 From: Qstick Date: Wed, 13 Dec 2017 21:49:37 -0500 Subject: [PATCH] Fix: Don't handle content requests in IndexHtmlMapper --- src/Lidarr.Http/Frontend/Mappers/IndexHtmlMapper.cs | 9 ++++++--- src/Lidarr.Http/Frontend/StaticResourceModule.cs | 3 +-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Lidarr.Http/Frontend/Mappers/IndexHtmlMapper.cs b/src/Lidarr.Http/Frontend/Mappers/IndexHtmlMapper.cs index 94e7121ad..86b86ae03 100644 --- a/src/Lidarr.Http/Frontend/Mappers/IndexHtmlMapper.cs +++ b/src/Lidarr.Http/Frontend/Mappers/IndexHtmlMapper.cs @@ -49,9 +49,12 @@ namespace Lidarr.Http.Frontend.Mappers public override bool CanHandle(string resourceUrl) { - return !resourceUrl.Contains(".") && - !resourceUrl.StartsWith("/login") && - !resourceUrl.StartsWith("/Content"); + resourceUrl = resourceUrl.ToLowerInvariant(); + + return !resourceUrl.StartsWith("/content") && + !resourceUrl.Contains(".") && + !resourceUrl.StartsWith("/login"); + } public override Response GetResponse(string resourceUrl) diff --git a/src/Lidarr.Http/Frontend/StaticResourceModule.cs b/src/Lidarr.Http/Frontend/StaticResourceModule.cs index 627ec28b5..6b10e1125 100644 --- a/src/Lidarr.Http/Frontend/StaticResourceModule.cs +++ b/src/Lidarr.Http/Frontend/StaticResourceModule.cs @@ -1,8 +1,7 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using Nancy; -using Nancy.Responses; using NLog; using NzbDrone.Core.Configuration; using Lidarr.Http.Frontend.Mappers;