StaticServeOptions
Defined in: src/util/types.ts:863
Type Parameters
Section titled “Type Parameters”T extends Record<string, any>
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
|
|
How to treat dotfiles (files starting with .) ‘allow’: Serve them ‘deny’: Return 403 ‘ignore’: Return 404 Default |
||
|
|
Enable ETags for static files. |
||
|
( |
Regex or glob patterns to exclude |
||
|
|
Try to append these extensions to the path if the file is not found. e.g. [‘html’, ‘htm’] |
||
|
Hooks to intercept requests/responses. |
|||
|
|
Whether the file is immutable. maxAge must be set to a value > 0 for this to have any effect. |
||
|
|
Index file(s) to look for when a directory is requested. Default |
||
|
|
Whether to list directory contents if no index file is found. Security Note: Directory listing is disabled by default to prevent information disclosure. Enable this only if you specifically need it and understand the security implications. Default |
||
|
|
Maximum age for the cache. |
||
|
OpenAPI specification for the static route. |
|||
|
|
Root directory to serve files from. Can be an absolute path or relative to the CWD. |
||
|
|
Whether to use the cache. Default |