From 2caca9e40750b67addc70eef8f6fcc17cddbcc7b Mon Sep 17 00:00:00 2001 From: Jeffrey van Norden Date: Mon, 14 Feb 2022 17:00:26 +0100 Subject: [PATCH 1/2] Allow CorsOptionsDelegate as cors options --- lib/server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/server.ts b/lib/server.ts index 44ce2ee6..49d60e5c 100644 --- a/lib/server.ts +++ b/lib/server.ts @@ -9,7 +9,7 @@ import { serialize } from "cookie"; import { Server as DEFAULT_WS_ENGINE } from "ws"; import { IncomingMessage, Server as HttpServer } from "http"; import { CookieSerializeOptions } from "cookie"; -import { CorsOptions } from "cors"; +import {CorsOptions, CorsOptionsDelegate} from "cors"; const debug = debugModule("engine"); @@ -105,7 +105,7 @@ export interface ServerOptions { /** * the options that will be forwarded to the cors module */ - cors?: CorsOptions; + cors?: CorsOptions|CorsOptionsDelegate; /** * whether to enable compatibility with Socket.IO v2 clients * @default false From 14c488fef065ef2d782325d5401a87614f67929c Mon Sep 17 00:00:00 2001 From: Damien Arrachequesne Date: Thu, 17 Feb 2022 06:32:11 +0100 Subject: [PATCH 2/2] lint --- lib/server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/server.ts b/lib/server.ts index 49d60e5c..739e38aa 100644 --- a/lib/server.ts +++ b/lib/server.ts @@ -9,7 +9,7 @@ import { serialize } from "cookie"; import { Server as DEFAULT_WS_ENGINE } from "ws"; import { IncomingMessage, Server as HttpServer } from "http"; import { CookieSerializeOptions } from "cookie"; -import {CorsOptions, CorsOptionsDelegate} from "cors"; +import { CorsOptions, CorsOptionsDelegate } from "cors"; const debug = debugModule("engine"); @@ -105,7 +105,7 @@ export interface ServerOptions { /** * the options that will be forwarded to the cors module */ - cors?: CorsOptions|CorsOptionsDelegate; + cors?: CorsOptions | CorsOptionsDelegate; /** * whether to enable compatibility with Socket.IO v2 clients * @default false