Skip to content

Commit 1fda751

Browse files
committed
chore: Added DataProtection-keys
1 parent e2a0e13 commit 1fda751

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CFLookup/CFLookup.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.21" />
1515
<PackageReference Include="Hangfire.Dashboard.BasicAuthorization" Version="1.0.2" />
1616
<PackageReference Include="Hangfire.Redis.StackExchange" Version="1.12.0" />
17+
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="10.0.0" />
1718
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.5" />
1819
<PackageReference Include="Highsoft.Highcharts" Version="11.4.6.5" />
1920
<PackageReference Include="Highsoft.Highstock" Version="11.4.6.5" />

CFLookup/Program.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using CFLookup;
2+
using Microsoft.AspNetCore.DataProtection;
23
#if !DEBUG
34
using CFLookup.Jobs;
45
using Hangfire;
@@ -100,6 +101,10 @@ private static async Task Main(string[] args)
100101
var redis = ConnectionMultiplexer.Connect(redisServer);
101102

102103
builder.Services.AddSingleton(redis);
104+
105+
builder.Services.AddDataProtection()
106+
.PersistKeysToStackExchangeRedis(redis, "CFLookup-DataProtection-Keys");
107+
103108

104109
builder.Services.AddScoped(x => new SqlConnection(dbConnectionString));
105110

0 commit comments

Comments
 (0)