Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Readarr/commit/8292d4d2674f6c8dfc3874ccdbed59601af92c22 You should set ROOT_URL correctly, otherwise the web may not work correctly.

Fixed: API Authentication issues with Apache Basic Auth

pull/6/head
Mark McDowall 11 years ago
parent 6b90a3a1eb
commit 8292d4d267

@ -1,4 +1,5 @@
using System;
using System.Linq;
using Nancy;
using Nancy.Bootstrapper;
using NzbDrone.Api.Extensions;
@ -33,7 +34,9 @@ namespace NzbDrone.Api.Authentication
return response;
}
var apiKey = context.Request.Headers.Authorization;
var authorizationHeader = context.Request.Headers.Authorization;
var apiKeyHeader = context.Request.Headers["X-Api-Key"].FirstOrDefault();
var apiKey = String.IsNullOrWhiteSpace(apiKeyHeader) ? authorizationHeader : apiKeyHeader;
if (context.Request.IsApiRequest() && !ValidApiKey(apiKey) && !_authenticationService.IsAuthenticated(context))
{

@ -25,7 +25,7 @@ define(
if (xhr) {
xhr.headers = xhr.headers || {};
xhr.headers.Authorization = window.NzbDrone.ApiKey;
xhr.headers['X-Api-Key'] = window.NzbDrone.ApiKey;
}
return original.apply(this, arguments);

Loading…
Cancel
Save