Support serving a full directory tree from the local filesystem (and eventually also from data baked into the binary for easy release builds). Some things I'd like it to do:
- be fairly secure. At least avoid
..-style directory traversal attacks. Possibly an equivalent of nginx's disable_symlinks.
- MIME types. At least extension-based guessing (there's a
mime_guess crate for this), preferably something pluggable.
- indefinite
Expires headers for files with content-hashed filenames (see WebPack caching for example).
- directory listings, probably in a customizable way
- automatic gzip handling (if browser specifies
Accept-Encoding: gzip, look for a file ending in .gz first and serve that with Content-Encoding: gzip)
I have a work in progress. It depends on nix-rust/nix#916.
Support serving a full directory tree from the local filesystem (and eventually also from data baked into the binary for easy release builds). Some things I'd like it to do:
..-style directory traversal attacks. Possibly an equivalent of nginx'sdisable_symlinks.mime_guesscrate for this), preferably something pluggable.Expiresheaders for files with content-hashed filenames (see WebPack caching for example).Accept-Encoding: gzip, look for a file ending in.gzfirst and serve that withContent-Encoding: gzip)I have a work in progress. It depends on nix-rust/nix#916.