Module afire::extension::serve_static

source ·
Expand description

Serve Static Content from the file system.

Structs

  • Struct to hold a file extension and its matching MIME type
  • Serve Static Content

Constants

  • Common MIME Types (sorted in alphabetical order by extension)

Functions

  • Gets the MIME type from the specified file extension using a slice of MIME types. If no type is found, None is returned.
  • Prevents path traversals. Ex: ‘/hello/../../../data.db’ => ‘/data.db’