aboutsummaryrefslogtreecommitdiff
path: root/src/cors/index.d.ts
blob: d6e651a04b8548daa207d9890c19875283535692 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { NextFunction, Request, Response } from 'express';

export interface CORSOptions {
	origins?: string[] | Function;
	methods?: string[];
	requestHeaders?: string[];
	responseHeaders?: string[];
	supportsCredentials?: boolean;
	maxAge?: number;
	endPreflightRequests?: boolean;
}

export const cors: () =>
	(req: Request, res: Response, next: NextFunction) =>
		void;