File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ open Suave.Sockets.Control
1414open Suave.WebSocket
1515open System.Reflection
1616open Logger
17+ open Suave.Writers
1718
1819type FornaxExiter () =
1920 interface IExiter with
@@ -105,13 +106,23 @@ let ws (webSocket : WebSocket) (context: HttpContext) =
105106 }
106107
107108let getWebServerConfig port =
109+ let mimeTypes =
110+ defaultMimeTypesMap @@
111+ ( function
112+ | " .webp" -> createMimeType " image/webp" false
113+ | _ -> None
114+ )
115+
116+ let webServerConfig =
117+ { defaultConfig with mimeTypesMap = mimeTypes }
118+
108119 match port with
109120 | Some port ->
110- { defaultConfig with
121+ { webServerConfig with
111122 bindings =
112123 [ HttpBinding.create Protocol.HTTP Net.IPAddress.Loopback port ] }
113124 | None ->
114- defaultConfig
125+ webServerConfig
115126
116127let getOutputDirectory ( output : option < string >) ( cwd : string ) =
117128 match output with
You can’t perform that action at this time.
0 commit comments