File tree Expand file tree Collapse file tree
packages/common/interfaces/external Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ type StaticOrigin = boolean | string | RegExp | ( string | RegExp ) [ ] ;
2+
13/**
24 * Set origin to a function implementing some custom logic. The function takes the
35 * request origin as the first parameter and a callback (which expects the signature
911 */
1012export type CustomOrigin = (
1113 requestOrigin : string ,
12- callback : ( err : Error | null , allow ?: boolean ) => void ,
14+ callback : ( err : Error | null , origin ?: StaticOrigin ) => void ,
1315) => void ;
1416
1517/**
@@ -22,7 +24,7 @@ export interface CorsOptions {
2224 /**
2325 * Configures the `Access-Control-Allow-Origins` CORS header. See [here for more detail.](https://github.com/expressjs/cors#configuration-options)
2426 */
25- origin ?: boolean | string | RegExp | ( string | RegExp ) [ ] | CustomOrigin ;
27+ origin ?: StaticOrigin | CustomOrigin ;
2628 /**
2729 * Configures the Access-Control-Allow-Methods CORS header.
2830 */
You can’t perform that action at this time.
0 commit comments