@types/cors
- Version 2.8.17
- Published
- 5.91 kB
- 1 dependency
- MIT license
Install
npm i @types/cors
yarn add @types/cors
pnpm add @types/cors
Overview
TypeScript definitions for cors
Index
Functions
function e
e: <T extends e.CorsRequest = e.CorsRequest>( options?: e.CorsOptions | e.CorsOptionsDelegate<T>) => ( req: T, res: { statusCode?: number | undefined; setHeader(key: string, value: string): any; end(): any; }, next: (err?: any) => any) => void;
Interfaces
interface CorsOptions
interface CorsOptions {}
property allowedHeaders
allowedHeaders?: string | string[] | undefined;
property credentials
credentials?: boolean | undefined;
property exposedHeaders
exposedHeaders?: string | string[] | undefined;
property maxAge
maxAge?: number | undefined;
property methods
methods?: string | string[] | undefined;
'GET,HEAD,PUT,PATCH,POST,DELETE'
property optionsSuccessStatus
optionsSuccessStatus?: number | undefined;
204
property origin
origin?: StaticOrigin | CustomOrigin | undefined;
'*''
property preflightContinue
preflightContinue?: boolean | undefined;
false
interface CorsRequest
interface CorsRequest {}
Type Aliases
type CorsOptionsDelegate
type CorsOptionsDelegate<T extends CorsRequest = CorsRequest> = ( req: T, callback: (err: Error | null, options?: CorsOptions) => void) => void;
Package Files (1)
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/cors
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/cors)
- HTML<a href="https://www.jsdocs.io/package/@types/cors"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 1994 ms. - Missing or incorrect documentation? Open an issue for this package.