mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 12:33:00 +02:00
moved static resource to basic nancy module.
cache and gzip piplelines are missing
This commit is contained in:
25
NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs
Normal file
25
NzbDrone.Api/Frontend/Mappers/IndexHtmlMapper.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.IO;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
|
||||
namespace NzbDrone.Api.Frontend.Mappers
|
||||
{
|
||||
public class IndexHtmlMapper : IMapHttpRequestsToDisk
|
||||
{
|
||||
private readonly string _indexPath;
|
||||
|
||||
public IndexHtmlMapper(IAppFolderInfo appFolderInfo)
|
||||
{
|
||||
_indexPath = Path.Combine(appFolderInfo.StartUpFolder, "UI", "index.html");
|
||||
}
|
||||
|
||||
public string Map(string resourceUrl)
|
||||
{
|
||||
return _indexPath;
|
||||
}
|
||||
|
||||
public bool CanHandle(string resourceUrl)
|
||||
{
|
||||
return !resourceUrl.Contains(".");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user