New: ical is available with API key authentication

pull/2/head
Mark McDowall 11 years ago
parent bb25c8955c
commit 78ded70b39

@ -29,7 +29,7 @@ namespace NzbDrone.Api.Authentication
var apiKey = GetApiKey(context);
if (context.Request.IsApiRequest() && !ValidApiKey(apiKey))
if ((context.Request.IsApiRequest() || context.Request.IsFeedRequest()) && !ValidApiKey(apiKey))
{
response = new Response { StatusCode = HttpStatusCode.Unauthorized };
}

@ -10,6 +10,11 @@ namespace NzbDrone.Api.Extensions
return request.Path.StartsWith("/api/", StringComparison.InvariantCultureIgnoreCase);
}
public static bool IsFeedRequest(this Request request)
{
return request.Path.StartsWith("/feed/", StringComparison.InvariantCultureIgnoreCase);
}
public static bool IsSignalRRequest(this Request request)
{
return request.Path.StartsWith("/signalr/", StringComparison.InvariantCultureIgnoreCase);

Loading…
Cancel
Save