mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 09:03:49 -07:00
using pre-compiled handlebar templates
re-did static content from nancy
This commit is contained in:
parent
3720afd30d
commit
375f887539
21 changed files with 367 additions and 124 deletions
|
@ -1,30 +0,0 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using Nancy;
|
||||
using Nancy.Responses.Negotiation;
|
||||
|
||||
namespace NzbDrone.Api.FrontendModule
|
||||
{
|
||||
public class IndexModule : NancyModule
|
||||
{
|
||||
public IndexModule()
|
||||
{
|
||||
//Serve anything that doesn't have an extension
|
||||
Get[@"/(.*)"] = x => Index();
|
||||
}
|
||||
|
||||
private object Index()
|
||||
{
|
||||
if(
|
||||
Request.Path.Contains(".")
|
||||
|| Request.Path.StartsWith("/static", StringComparison.CurrentCultureIgnoreCase)
|
||||
|| Request.Path.StartsWith("/api", StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
return new NotFoundResponse();
|
||||
}
|
||||
|
||||
|
||||
return View["UI/index.html"];
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue