summaryrefslogtreecommitdiff
path: root/src/SomhairlesDream.Server/Program.fs
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-21 23:47:42 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-21 23:47:42 +0800
commit5d73943e584b1c0c0753dda85fbda34d27726986 (patch)
tree5126127692f3cd399345aae8ade5ec66dd247668 /src/SomhairlesDream.Server/Program.fs
parent7c3a0728570f84f5c7d5f396c5a5d5c11f5fb661 (diff)
downloadsomhairles-dream-fsharp-5d73943e584b1c0c0753dda85fbda34d27726986.tar.gz
feat(ship): HNX-02 Copernicus rework — continuous hull, few-large-element scale, Draco pipeline, side-on framing
Diffstat (limited to 'src/SomhairlesDream.Server/Program.fs')
-rw-r--r--src/SomhairlesDream.Server/Program.fs13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/SomhairlesDream.Server/Program.fs b/src/SomhairlesDream.Server/Program.fs
index 53cfef6..b2ea8a8 100644
--- a/src/SomhairlesDream.Server/Program.fs
+++ b/src/SomhairlesDream.Server/Program.fs
@@ -6,6 +6,7 @@ open System.Threading.Tasks
open Microsoft.AspNetCore.Builder
open Microsoft.AspNetCore.Hosting
open Microsoft.AspNetCore.Http
+open Microsoft.AspNetCore.StaticFiles
open Microsoft.Extensions.FileProviders
open Microsoft.Extensions.Hosting
open SomhairlesDream.Server
@@ -57,7 +58,17 @@ let events (context: HttpContext) : Task =
} :> Task)
app.UseDefaultFiles() |> ignore
-app.UseStaticFiles() |> ignore
+
+// Serve geometry and decoder binaries with correct MIME types: ASP.NET's
+// default map has no entry for .glb/.wasm, so those requests would 404.
+let staticFileOptions =
+ let provider = FileExtensionContentTypeProvider()
+ provider.Mappings.[".glb"] <- "model/gltf-binary"
+ provider.Mappings.[".gltf"] <- "model/gltf+json"
+ provider.Mappings.[".wasm"] <- "application/wasm"
+ StaticFileOptions(ContentTypeProvider = provider)
+
+app.UseStaticFiles(staticFileOptions) |> ignore
app.MapGet("/health", Func<IResult>(fun () -> Results.Ok({| status = "ok" |}))) |> ignore