mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-17 21:25:39 -04:00
Fixed: Don't redirect //api route to homepage
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user