StaticFilesOptionsType
Esta página aún no está disponible en tu idioma.
StaticFilesOptionsType =
object
Defined in: src/http/static/StaticFilesOptions.ts:9
Plain settings shape for the static-file directives.
Properties
Section titled “Properties”browse?
Section titled “browse?”
readonlyoptionalbrowse?:boolean
Defined in: src/http/static/StaticFilesOptions.ts:13
Render an HTML listing when a directory has no usable index. Default false.
cacheControl?
Section titled “cacheControl?”
readonlyoptionalcacheControl?:string
Defined in: src/http/static/StaticFilesOptions.ts:15
Cache-Control header value. Default: header omitted.
contentType?
Section titled “contentType?”
readonlyoptionalcontentType?:string
Defined in: src/http/static/StaticFilesOptions.ts:29
getFromFile only: force this exact content-type.
contentTypes?
Section titled “contentTypes?”
readonlyoptionalcontentTypes?:Readonly<Record<string,string>>
Defined in: src/http/static/StaticFilesOptions.ts:27
Per-extension content-type overrides (ext → full content-type).
dotfiles?
Section titled “dotfiles?”
readonlyoptionaldotfiles?:"deny"|"allow"
Defined in: src/http/static/StaticFilesOptions.ts:23
Dotfile policy. Default 'deny' (404 + hidden from listings).
readonlyoptionaletag?:boolean
Defined in: src/http/static/StaticFilesOptions.ts:17
Emit a weak ETag (size + mtime) and honour If-None-Match. Default true.
indexFiles?
Section titled “indexFiles?”
readonlyoptionalindexFiles?: readonlystring[]
Defined in: src/http/static/StaticFilesOptions.ts:11
Index files tried for a directory request. Default ['index.html']; [] disables.
lastModified?
Section titled “lastModified?”
readonlyoptionallastModified?:boolean
Defined in: src/http/static/StaticFilesOptions.ts:19
Emit Last-Modified and honour If-Modified-Since. Default true.
maxFileSize?
Section titled “maxFileSize?”
readonlyoptionalmaxFileSize?:number
Defined in: src/http/static/StaticFilesOptions.ts:31
Max file size buffered into memory. Default 50 MiB; larger → 413.
ranges?
Section titled “ranges?”
readonlyoptionalranges?:boolean
Defined in: src/http/static/StaticFilesOptions.ts:21
Honour a single Range request (206 / 416). Default true.
symlinks?
Section titled “symlinks?”
readonlyoptionalsymlinks?:"within-root"|"follow"
Defined in: src/http/static/StaticFilesOptions.ts:25
Symlink policy. Default 'within-root' (a link escaping the root → 404).
