Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/alosaur/src/static/send.ts>SendOptions

Alosaur - Deno web framework with many decorators
Go to Latest
interface SendOptions
import { type SendOptions } from "https://deno.land/x/alosaur@v0.16.2/src/static/send.ts";

Properties

optional
maxage: number

Browser cache max-age in milliseconds. (defaults to 0)

optional
immutable: boolean

Tell the browser the resource is immutable and can be cached indefinitely. (defaults to false)

optional
hidden: boolean

Allow transfer of hidden files. (defaults to false)

root: string

Root directory to restrict file access.

optional
index: string

Name of the index file to serve automatically when visiting the root location. (defaults to none)

optional
gzip: boolean

Try to serve the gzipped version of a file automatically when gzip is supported by a client and if the requested file with .gz extension exists. (defaults to true).

optional
brotli: boolean

Try to serve the brotli version of a file automatically when brotli is supported by a client and if the requested file with .br extension exists. (defaults to true)

optional
format: boolean

If true, format the path to serve static file servers and not require a trailing slash for directories, so that you can do both /directory and /directory/. (defaults to true)

optional
extensions: string[]

Try to match extensions from passed array to search for file when no extension is sufficed in URL. First found is served. (defaults to undefined)