Skip to content

Commit

Permalink
fix: align CorsOptions.origin type with @types/cors
Browse files Browse the repository at this point in the history
  • Loading branch information
reifiedbeans committed Aug 8, 2024
1 parent fcf50c2 commit 6c8a431
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 6c8a431

Please sign in to comment.