ServeDirOptions
import { ServeDirOptions } from "jsr:@ende/http/unstable-file-server";interface ยท experimental
interface ServeDirOptions extends StableServeDirOptionsInterface for serveDir options.
Properties
cleanUrls
cleanUrls?: booleanAlso serves .html files without the need for specifying the extension.
For example foo.html could be accessed through both /foo and /foo.html.
Default: false
dotfiles
dotfiles?: "allow" | "deny" | "ignore"How to treat dotfiles (files and directories whose name starts with a dot):
"ignore": respond with404 Not Found, as if the file does not exist, and hide dotfiles from directory listings."deny": respond with403 Forbiddenand hide dotfiles from directory listings."allow": no special treatment; serve dotfiles and show them in directory listings.
Takes precedence over ServeDirOptions.showDotfiles when both
are specified.
Default: "ignore"