Skip to content

Commit a463d26

Browse files
authored
fix(typings): allow CorsOptionsDelegate as cors options (#641)
Reference: https://www.npmjs.com/package/cors#configuring-cors-asynchronously Related: DefinitelyTyped/DefinitelyTyped@54a59cd
1 parent 90fb0a9 commit a463d26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: lib/server.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { serialize } from "cookie";
99
import { Server as DEFAULT_WS_ENGINE } from "ws";
1010
import { IncomingMessage, Server as HttpServer } from "http";
1111
import { CookieSerializeOptions } from "cookie";
12-
import { CorsOptions } from "cors";
12+
import { CorsOptions, CorsOptionsDelegate } from "cors";
1313

1414
const debug = debugModule("engine");
1515

@@ -105,7 +105,7 @@ export interface ServerOptions {
105105
/**
106106
* the options that will be forwarded to the cors module
107107
*/
108-
cors?: CorsOptions;
108+
cors?: CorsOptions | CorsOptionsDelegate;
109109
/**
110110
* whether to enable compatibility with Socket.IO v2 clients
111111
* @default false

0 commit comments

Comments
 (0)