Module

x/servest/mod.ts>ServeStaticOptions

🌾A progressive http server for Deno🌾
Latest
interface ServeStaticOptions
import { type ServeStaticOptions } from "https://dotland.deno.dev/x/servest@v1.3.4/mod.ts";

Properties

optional
contentTypeMap: Map<string, string>

Custom Content-Type mapper. .ext -> application/some-type By default, .ts/.tsx will be resolved by application/typescript.

optional
contentDispositionMap: Map<string, "inline" | "attachment">

Custom Content-Disposition mapper. .ext -> "inline" | "attachment" By default, Content-Disposition header won't be set for any files.

optional
filter: (file: string) => boolean | Promise<boolean>

Custom filter function for files

optional
cacheControl: CacheControlOptions

Delactives for Cache-Control header No value will be sent by default.

optional
expires: Date

Value for Expires header