Skip to content

directory tree support #7

@scottlamb

Description

@scottlamb

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions