dir: handle html

This commit is contained in:
Simon Cruanes 2024-02-27 11:00:42 -05:00
parent 6cfd1975d1
commit 384515a594
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -310,7 +310,10 @@ let add_vfs_ ~on_fs ~top ~config ~vfs:((module VFS : VFS) as vfs) ~prefix server
) else ( ) else (
try try
let mime_type = let mime_type =
if Filename.extension path = ".css" then (* FIXME: handle .html specially *)
if Filename.extension path = ".html" then
[ "Content-Type", "text/html" ]
else if Filename.extension path = ".css" then
[ "Content-Type", "text/css" ] [ "Content-Type", "text/css" ]
else if Filename.extension path = ".js" then else if Filename.extension path = ".js" then
[ "Content-Type", "text/javascript" ] [ "Content-Type", "text/javascript" ]