1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-19 10:54:05 +02:00
Sonarr/NzbDrone.Api/Frontend/IsCacheableSpecification.cs

18 lines
487 B
C#
Raw Normal View History

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;
}
}
}