From e791f22333b739b4fadcf75058e806101a9d1073 Mon Sep 17 00:00:00 2001 From: ta264 Date: Mon, 19 Jul 2021 21:59:30 +0100 Subject: [PATCH] Fixed: Don't redirect //api route to homepage --- src/Readarr.Http/Frontend/StaticResourceController.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Readarr.Http/Frontend/StaticResourceController.cs b/src/Readarr.Http/Frontend/StaticResourceController.cs index a0aac88a8..e41af0a78 100644 --- a/src/Readarr.Http/Frontend/StaticResourceController.cs +++ b/src/Readarr.Http/Frontend/StaticResourceController.cs @@ -4,8 +4,6 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Cors; using Microsoft.AspNetCore.Mvc; using NLog; -using NzbDrone.Common.EnvironmentInfo; -using NzbDrone.Core.Configuration; using Readarr.Http.Extensions; using Readarr.Http.Frontend.Mappers; @@ -34,14 +32,14 @@ namespace Readarr.Http.Frontend [EnableCors("AllowGet")] [AllowAnonymous] - [HttpGet("/content/{**path:regex(^(?!api/).*)}")] + [HttpGet("content/{**path:regex(^(?!/*api/).*)}")] public IActionResult IndexContent([FromRoute] string path) { return MapResource("Content/" + path); } [HttpGet("")] - [HttpGet("/{**path:regex(^(?!api/).*)}")] + [HttpGet("/{**path:regex(^(?!/*api/).*)}")] public IActionResult Index([FromRoute] string path) { return MapResource(path);