engine/request/static

Serve static files with optional cache + gzip. Engine-internal.
Description:
  • Serve static files with optional cache + gzip. Engine-internal.

Methods

(inner) serveDirectoryOr404()

Description:
  • Directory index redirect or 404.

(async, inner) serveStaticFile(opts) → {Promise.<boolean>}

Parameters:
Name Type Description
opts object
Returns:
true if this handler owns the response (caller should stop)
Type
Promise.<boolean>