fix: storing data protection keys
This commit is contained in:
parent
c189cc6955
commit
c51a9cecc9
@ -1,4 +1,5 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
@ -94,13 +95,15 @@ public class Program
|
||||
builder.Services.AddJwtToken(builder.Configuration);
|
||||
builder.Services.AddSecurity(builder.Configuration);
|
||||
|
||||
builder.Services.AddDataProtection()
|
||||
.PersistKeysToFileSystem(new DirectoryInfo(PathBuilder.Combine("DataProtection")));
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseForwardedHeaders();
|
||||
app.UseStaticFiles(UrlHelper.GetSubPath.TrimEnd('/'));
|
||||
app.UseCors("AllowAll");
|
||||
app.UseCustomSerilog();
|
||||
app.UseForwardedHeaders();
|
||||
|
||||
using (var scope = app.Services.CreateScope())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user