You've already forked Sonarr
mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-09-16 09:26:36 +02:00
@@ -215,6 +215,7 @@ namespace NzbDrone.Common.Instrumentation
|
||||
c.ForLogger("Microsoft.*").WriteToNil(LogLevel.Warn);
|
||||
c.ForLogger("Microsoft.Hosting.Lifetime*").WriteToNil(LogLevel.Info);
|
||||
c.ForLogger("Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware").WriteToNil(LogLevel.Fatal);
|
||||
c.ForLogger("Sonarr.Http.Authentication.ApiKeyAuthenticationHandler").WriteToNil(LogLevel.Info);
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -54,7 +54,7 @@ namespace NzbDrone.Host
|
||||
b.ClearProviders();
|
||||
b.SetMinimumLevel(LogLevel.Trace);
|
||||
b.AddFilter("Microsoft.AspNetCore", LogLevel.Warning);
|
||||
b.AddFilter("Sonarr.Http.Authentication", LogLevel.Information);
|
||||
b.AddFilter("Sonarr.Http.Authentication.ApiKeyAuthenticationHandler", LogLevel.Information);
|
||||
b.AddFilter("Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager", LogLevel.Error);
|
||||
b.AddNLog();
|
||||
});
|
||||
|
@@ -8,7 +8,7 @@ namespace NzbDrone.Http.Authentication
|
||||
{
|
||||
public class UiAuthorizationPolicyProvider : IAuthorizationPolicyProvider
|
||||
{
|
||||
private const string POLICY_NAME = "UI";
|
||||
private const string PolicyName = "UI";
|
||||
private readonly IConfigFileProvider _config;
|
||||
|
||||
public DefaultAuthorizationPolicyProvider FallbackPolicyProvider { get; }
|
||||
@@ -26,7 +26,7 @@ namespace NzbDrone.Http.Authentication
|
||||
|
||||
public Task<AuthorizationPolicy> GetPolicyAsync(string policyName)
|
||||
{
|
||||
if (policyName.Equals(POLICY_NAME, StringComparison.OrdinalIgnoreCase))
|
||||
if (policyName.Equals(PolicyName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var policy = new AuthorizationPolicyBuilder(_config.AuthenticationMethod.ToString())
|
||||
.AddRequirements(new BypassableDenyAnonymousAuthorizationRequirement());
|
||||
|
Reference in New Issue
Block a user