Module vibe.http.fileserver
A static HTTP file server.
Functions
Name | Description |
cacheMatch(match, etag, allow_weak)
|
Matches a given match expression with a specific ETag. Can allow or disallow weak ETags and supports multiple tags.
|
handleCache(req, res, etag, last_modified, cache_control, max_age)
|
Processes header tags in a request and writes responses given on requested cache status.
|
handleCacheFile(req, res, file, cache_control, max_age)
|
Calls handleCache with prefilled etag and lastModified value based on a file.
|
sendFile(req, res, path, settings)
|
Sends a file to the given HTTP server response object.
|
serveStaticFile(local_path, settings)
|
Returns a request handler that serves a specific file on disk.
|
serveStaticFiles(local_path, settings)
|
Returns a request handler that serves files from the specified directory.
|
Structs
Name | Description |
ETag
|
Represents an Entity-Tag value for use inside HTTP Cache headers.
|