mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-23 22:17:15 -04:00
Fixed: Forms login page uses urlbase for logo
(cherry picked from commit e0f30c3eaeab7d863b4b4104a9f0d501bd693f69) (cherry picked from commit 73f81465e9e38ea545155b4ec98b23ddb9bc4816) (cherry picked from commit 0332356fa34a893bc856d39e280f70681ffbc822)
This commit is contained in:
parent
aa49358b97
commit
ee84321d4b
1 changed files with 2 additions and 11 deletions
|
@ -1,5 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Cors;
|
||||
|
@ -16,29 +15,21 @@ namespace Radarr.Http.Frontend
|
|||
[ApiController]
|
||||
public class StaticResourceController : Controller
|
||||
{
|
||||
private readonly string _urlBase;
|
||||
private readonly string _loginPath;
|
||||
private readonly IEnumerable<IMapHttpRequestsToDisk> _requestMappers;
|
||||
private readonly Logger _logger;
|
||||
|
||||
public StaticResourceController(IConfigFileProvider configFileProvider,
|
||||
IAppFolderInfo appFolderInfo,
|
||||
IEnumerable<IMapHttpRequestsToDisk> requestMappers,
|
||||
public StaticResourceController(IEnumerable<IMapHttpRequestsToDisk> requestMappers,
|
||||
Logger logger)
|
||||
{
|
||||
_urlBase = configFileProvider.UrlBase.Trim('/');
|
||||
_requestMappers = requestMappers;
|
||||
_logger = logger;
|
||||
|
||||
_loginPath = Path.Combine(appFolderInfo.StartUpFolder, configFileProvider.UiFolder, "login.html");
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
[HttpGet("login")]
|
||||
public IActionResult LoginPage()
|
||||
{
|
||||
Response.Headers.DisableCache();
|
||||
return PhysicalFile(_loginPath, "text/html");
|
||||
return MapResource("login");
|
||||
}
|
||||
|
||||
[EnableCors("AllowGet")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue