This repository was archived by the owner on Sep 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/SqlStreamStore.Server Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 11using System ;
2+ using System . Collections . Generic ;
3+ using System . Linq ;
24using System . Threading . Tasks ;
35using Microsoft . AspNetCore . Builder ;
46using Microsoft . AspNetCore . Hosting ;
57using Microsoft . AspNetCore . Http ;
8+ using Microsoft . AspNetCore . ResponseCompression ;
69using Microsoft . Extensions . DependencyInjection ;
710using SqlStreamStore . HAL ;
811using SqlStreamStore . Server . Browser ;
@@ -16,6 +19,13 @@ namespace SqlStreamStore.Server
1619{
1720 internal class SqlStreamStoreServerStartup : IStartup
1821 {
22+ private static readonly IEnumerable < string > s_CompressableMimeTypes = ResponseCompressionDefaults
23+ . MimeTypes . Concat ( new [ ]
24+ {
25+ "application/hal+json" ,
26+ "text/markdown"
27+ } ) ;
28+
1929 private readonly IStreamStore _streamStore ;
2030 private readonly SqlStreamStoreMiddlewareOptions _options ;
2131
@@ -28,7 +38,7 @@ public SqlStreamStoreServerStartup(
2838 }
2939
3040 public IServiceProvider ConfigureServices ( IServiceCollection services ) => services
31- . AddResponseCompression ( options => options . MimeTypes = new [ ] { "application/hal+json" } )
41+ . AddResponseCompression ( options => options . MimeTypes = s_CompressableMimeTypes )
3242 . AddRouting ( )
3343 . BuildServiceProvider ( ) ;
3444
You can’t perform that action at this time.
0 commit comments