Add .sxbc MIME type to OCaml HTTP server static file handler

Stops 404s for bytecoded module files — the server now serves .sxbc
files with the correct content type.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-31 17:00:44 +00:00
parent a7efcaf679
commit 200e5d5e47

View File

@@ -1639,6 +1639,7 @@ let mime_type_of path =
else if Filename.check_suffix path ".woff2" then "font/woff2"
else if Filename.check_suffix path ".woff" then "font/woff"
else if Filename.check_suffix path ".sx" then "text/sx; charset=utf-8"
else if Filename.check_suffix path ".sxbc" then "text/sx; charset=utf-8"
else "application/octet-stream"
let static_cache : (string, string) Hashtbl.t = Hashtbl.create 256