mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Added API key authentication
This commit is contained in:
parent
689f27bee6
commit
57fdbe6e08
11 changed files with 114 additions and 15 deletions
|
@ -27,7 +27,10 @@ namespace NzbDrone.Api.Authentication
|
|||
private Response RequiresAuthentication(NancyContext context)
|
||||
{
|
||||
Response response = null;
|
||||
if (context.CurrentUser == null && _authenticationService.Enabled)
|
||||
|
||||
if (!context.Request.Path.StartsWith("/api/") &&
|
||||
context.CurrentUser == null &&
|
||||
_authenticationService.Enabled)
|
||||
{
|
||||
response = new Response { StatusCode = HttpStatusCode.Unauthorized };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue