From 071788e34568c34c5ad2cc1609a455ef2aa577ff Mon Sep 17 00:00:00 2001 From: Santi Albo Date: Mon, 10 Mar 2014 16:44:30 +0000 Subject: [PATCH] Add CORS method on restify module --- restify/restify.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/restify/restify.d.ts b/restify/restify.d.ts index 2afacc520f..f3e5bc46e2 100644 --- a/restify/restify.d.ts +++ b/restify/restify.d.ts @@ -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; }