|
|
@ -1,8 +1,9 @@
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using DryIoc;
|
|
|
|
using System.IO;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
using Microsoft.AspNetCore.Builder;
|
|
|
|
using Microsoft.AspNetCore.Builder;
|
|
|
|
|
|
|
|
using Microsoft.AspNetCore.DataProtection;
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
using Microsoft.AspNetCore.HttpOverrides;
|
|
|
|
using Microsoft.AspNetCore.HttpOverrides;
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
@ -46,6 +47,7 @@ namespace NzbDrone.Host
|
|
|
|
b.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
|
|
|
|
b.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
|
|
|
|
b.AddFilter("Microsoft.AspNetCore", Microsoft.Extensions.Logging.LogLevel.Warning);
|
|
|
|
b.AddFilter("Microsoft.AspNetCore", Microsoft.Extensions.Logging.LogLevel.Warning);
|
|
|
|
b.AddFilter("Readarr.Http.Authentication", LogLevel.Information);
|
|
|
|
b.AddFilter("Readarr.Http.Authentication", LogLevel.Information);
|
|
|
|
|
|
|
|
b.AddFilter("Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager", LogLevel.Error);
|
|
|
|
b.AddNLog();
|
|
|
|
b.AddNLog();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -95,6 +97,9 @@ namespace NzbDrone.Host
|
|
|
|
options.PayloadSerializerOptions = STJson.GetSerializerSettings();
|
|
|
|
options.PayloadSerializerOptions = STJson.GetSerializerSettings();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
services.AddDataProtection()
|
|
|
|
|
|
|
|
.PersistKeysToFileSystem(new DirectoryInfo(Configuration["dataProtectionFolder"]));
|
|
|
|
|
|
|
|
|
|
|
|
services.AddSingleton<IAuthorizationPolicyProvider, UiAuthorizationPolicyProvider>();
|
|
|
|
services.AddSingleton<IAuthorizationPolicyProvider, UiAuthorizationPolicyProvider>();
|
|
|
|
services.AddAuthorization(options =>
|
|
|
|
services.AddAuthorization(options =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|