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:
@@ -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 ".woff2" then "font/woff2"
|
||||||
else if Filename.check_suffix path ".woff" then "font/woff"
|
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 ".sx" then "text/sx; charset=utf-8"
|
||||||
|
else if Filename.check_suffix path ".sxbc" then "text/sx; charset=utf-8"
|
||||||
else "application/octet-stream"
|
else "application/octet-stream"
|
||||||
|
|
||||||
let static_cache : (string, string) Hashtbl.t = Hashtbl.create 256
|
let static_cache : (string, string) Hashtbl.t = Hashtbl.create 256
|
||||||
|
|||||||
Reference in New Issue
Block a user