File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -239,15 +239,17 @@ module Application =
239239 .AddResponseCompression( fun o ->
240240 // Note: By default there is setting: o.EnableForHttps <- false
241241 // If your SSL-site doesn't contain any user sensitive data, consider changing that to true.
242- o.MimeTypes <- Seq.append o.MimeTypes [|
242+ let additionalMime = [|
243243 " application/x-yaml" ;
244244 " image/svg+xml" ;
245245 " application/octet-stream" ;
246246 " application/x-font-ttf" ;
247247 " application/x-font-opentype" ;
248248 " application/x-javascript" ;
249249 " text/javascript" ;
250- |])
250+ |]
251+ o.MimeTypes <- if not ( isNull o.MimeTypes) then Seq.append o.MimeTypes additionalMime else Seq.ofArray ( additionalMime)
252+ )
251253 let middleware ( app : IApplicationBuilder ) = app.UseResponseCompression()
252254
253255 { state with
You can’t perform that action at this time.
0 commit comments