diff --git a/packages/vite/src/node/http.ts b/packages/vite/src/node/http.ts index 51a063ba800ccf..8a12179645fd23 100644 --- a/packages/vite/src/node/http.ts +++ b/packages/vite/src/node/http.ts @@ -75,7 +75,10 @@ export interface CommonServerOptions { export interface CorsOptions { origin?: | CorsOrigin - | ((origin: string, cb: (err: Error, origins: CorsOrigin) => void) => void) + | (( + origin: string | undefined, + cb: (err: Error, origins: CorsOrigin) => void, + ) => void) methods?: string | string[] allowedHeaders?: string | string[] exposedHeaders?: string | string[]