Aller au contenu principal
Version: Next

StaticFileOptions

Hierarchy

Index

Properties

optionalalias

alias?: {}

object map of aliases

optionalbuffer

buffer?: boolean

store the files in memory instead of streaming from the filesystem on each request.

optionalcacheControl

cacheControl?: string

optional cache control header. Overrides options.maxAge.

optionaldirs

dirs?: {}

optionaldynamic

dynamic?: boolean

dynamic load file which not cached on initialization.

optionalfilter

filter?: Function | string[]

filter files at init dir, for example - skip non build (source) files. If array set - allow only listed files

optionalgzip

gzip?: boolean

when request’s accept-encoding include gzip, files will compressed by gzip.

optionalmaxAge

maxAge?: number

cache control max age for the files, 0 by default.

optionalmaxFiles

maxFiles?: number

cache control max age for the files, 0 by default.

optionalpreload

preload?: boolean

caches the assets on initialization or not, default to true. always work together with options.dynamic.