File tree Expand file tree Collapse file tree 3 files changed +23
-4
lines changed
Certify.Server.Core/Certify.Server.Core
Certify.Server.HubService Expand file tree Collapse file tree 3 files changed +23
-4
lines changed Original file line number Diff line number Diff line change 11using System . Text ;
22using Certify . Management ;
3+ using Certify . Models ;
4+ using Microsoft . AspNetCore . DataProtection ;
35using Microsoft . AspNetCore . ResponseCompression ;
46using Microsoft . AspNetCore . SignalR ;
57using Microsoft . OpenApi . Models ;
@@ -24,10 +26,15 @@ public void ConfigureServices(IServiceCollection services)
2426 . AddSignalR ( )
2527 . AddMessagePackProtocol ( ) ;
2628
27- services . AddDataProtection ( a =>
28- {
29- a . ApplicationDiscriminator = "certify" ;
30- } ) ;
29+ var appDataPath = EnvironmentUtil . CreateAppDataPath ( "keys" ) ;
30+
31+ services
32+ . AddDataProtection ( a =>
33+ {
34+ a . ApplicationDiscriminator = "certify" ;
35+ } )
36+ . PersistKeysToFileSystem ( new DirectoryInfo ( appDataPath ) ) ;
37+
3138 services . AddResponseCompression ( opts =>
3239 {
3340 opts . MimeTypes = ResponseCompressionDefaults . MimeTypes . Concat ( new [ ] { "application/octet-stream" , "application/json" } ) ;
Original file line number Diff line number Diff line change 2727
2828 <ItemGroup >
2929 <ProjectReference Include =" ..\..\Certify.Aspire\Certify.Aspire.ServiceDefaults\Certify.Aspire.ServiceDefaults.csproj" />
30+ <ProjectReference Include =" ..\..\Certify.Shared\Certify.Shared.Core.csproj" />
3031 <ProjectReference Include =" ..\Certify.Server.Core\Certify.Server.Core\Certify.Server.Core.csproj" >
3132 <PrivateAssets >all</PrivateAssets >
3233 </ProjectReference >
Original file line number Diff line number Diff line change 11using Certify . Client ;
22using Certify . Management ;
3+ using Certify . Models ;
34using Certify . Server . Hub . Api . Middleware ;
45using Certify . Server . Hub . Api . Services ;
56using Certify . Server . Hub . Api . SignalR ;
67using Certify . Server . Hub . Api . SignalR . ManagementHub ;
78using Certify . Server . HubService . Services ;
9+ using Microsoft . AspNetCore . DataProtection ;
810using Microsoft . AspNetCore . Mvc . ApplicationParts ;
911using Microsoft . AspNetCore . SignalR ;
1012using Microsoft . AspNetCore . StaticFiles ;
3739 a . ApplicationDiscriminator = "certify" ;
3840} ) ;
3941
42+ var appDataPath = EnvironmentUtil . CreateAppDataPath ( "keys" ) ;
43+
44+ builder . Services
45+ . AddDataProtection ( a =>
46+ {
47+ a . ApplicationDiscriminator = "certify" ;
48+ } )
49+ . PersistKeysToFileSystem ( new DirectoryInfo ( appDataPath ) ) ;
50+
4051builder . Services . AddResponseCompression ( ) ;
4152
4253// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
You can’t perform that action at this time.
0 commit comments