mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Add CORS method on restify module
This commit is contained in:
Vendored
+12
@@ -160,6 +160,17 @@ declare module "restify" {
|
||||
(req: Request, res: Response, next: Next): any;
|
||||
}
|
||||
|
||||
interface CORS {
|
||||
(cors?: {
|
||||
origins?: string[];
|
||||
credentials?: boolean;
|
||||
headers?: string[];
|
||||
}): RequestHandler;
|
||||
origins: string[];
|
||||
ALLOW_HEADERS: string[];
|
||||
credentials: boolean;
|
||||
}
|
||||
|
||||
export function createServer(options?: ServerOptions): Server;
|
||||
|
||||
export function createJsonClient(options?: ClientOptions): Client;
|
||||
@@ -199,4 +210,5 @@ declare module "restify" {
|
||||
export function auditLogger(options?: Object): Function;
|
||||
export function fullResponse(): RequestHandler;
|
||||
export var defaultResponseHeaders : any;
|
||||
export var CORS: CORS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user