Add CORS method on restify module

This commit is contained in:
Santi Albo
2014-03-10 16:44:30 +00:00
parent 8eac4c4c54
commit 071788e345
+12
View File
@@ -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;
}