mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-29 05:16:34 +02:00
moved static resource to basic nancy module.
cache and gzip piplelines are missing
This commit is contained in:
18
NzbDrone.Api/Frontend/IsCacheableSpecification.cs
Normal file
18
NzbDrone.Api/Frontend/IsCacheableSpecification.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using Nancy;
|
||||
|
||||
namespace NzbDrone.Api.Frontend
|
||||
{
|
||||
public class IsCacheableSpecification
|
||||
{
|
||||
public bool IsCacheable(Request request)
|
||||
{
|
||||
if (request.Path.Contains(".")) return false;
|
||||
if (request.Path.StartsWith("/api", StringComparison.CurrentCultureIgnoreCase)) return false;
|
||||
if (request.Path.StartsWith("/signalr", StringComparison.CurrentCultureIgnoreCase)) return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user