Skip to main content
Module

x/cors/types.ts>CorsOptions

Deno.js CORS middleware
Extremely Popular
Latest
type alias CorsOptions
import { type CorsOptions } from "https://deno.land/x/cors@v1.2.2/types.ts";

CorsOptions

An Object that describes how CORS middleware should behave. The default configuration is the equivalent of:

{
 "origin": "*",
 "methods": "GET,HEAD,PUT,PATCH,POST,DELETE",
 "preflightContinue": false,
 "optionsSuccessStatus": 204,
}
definition: { origin?:
| boolean
| string
| RegExp
| (string | RegExp)[]
; methods?: string | string[]; allowedHeaders?: string | string[]; exposedHeaders?: string | string[]; credentials?: boolean; maxAge?: number; preflightContinue?: boolean; optionsSuccessStatus?: number; }