This repository was archived by the owner on Sep 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
src/SqlStreamStore.HAL.DevServer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,13 +21,16 @@ public DevServerStartup(IStreamStore streamStore)
2121 _streamStore = streamStore ;
2222 }
2323
24- public IServiceProvider ConfigureServices ( IServiceCollection services ) => services . BuildServiceProvider ( ) ;
24+ public IServiceProvider ConfigureServices ( IServiceCollection services ) => services
25+ . AddResponseCompression ( options => options . MimeTypes = new [ ] { "application/hal+json" } )
26+ . BuildServiceProvider ( ) ;
2527
2628 public void Configure ( IApplicationBuilder app ) => app
29+ . UseResponseCompression ( )
2730 . Use ( CatchAndDisplayErrors )
2831 . Use ( AllowAllOrigins )
2932 . UseSqlStreamStoreHal ( _streamStore ) ;
30-
33+
3134 private static MidFunc CatchAndDisplayErrors => async ( context , next ) =>
3235 {
3336 try
@@ -54,6 +57,5 @@ public void Configure(IApplicationBuilder app) => app
5457
5558 return next ( ) ;
5659 } ;
57-
5860 }
5961}
Original file line number Diff line number Diff line change 77 <ItemGroup >
88 <PackageReference Include =" Microsoft.AspNetCore.Hosting" Version =" 2.0.2" />
99 <PackageReference Include =" Microsoft.AspNetCore.Server.Kestrel" Version =" 2.0.2" />
10+ <PackageReference Include =" Microsoft.AspNetCore.ResponseCompression" Version =" 2.0.2" />
1011 </ItemGroup >
1112 <ItemGroup >
1213 <ProjectReference Include =" ..\SqlStreamStore.HAL\SqlStreamStore.HAL.csproj" />
You can’t perform that action at this time.
0 commit comments