Skip to content

Commit

Permalink
fix: align CorsOptions.origin type with @types/cors (#17836)
Browse files Browse the repository at this point in the history
  • Loading branch information
reifiedbeans authored Aug 14, 2024
1 parent e16bf1f commit 1bda847
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vite/src/node/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
Expand Down

0 comments on commit 1bda847

Please sign in to comment.