Cors: {
use(config): UsableMiddleware<{
allowAll: false;
credentials?: boolean;
exposeHeaders?: string[];
headers?: string[];
maxAge?: number;
methods?: string[];
origins?: string[];
} | {
allowAll: true;
maxAge?: number;
}, typeof Dummy, typeof Dummy, typeof Dummy, typeof Dummy>;
}
Type declaration
use:function
- use(config): UsableMiddleware<{
allowAll: false;
credentials?: boolean;
exposeHeaders?: string[];
headers?: string[];
maxAge?: number;
methods?: string[];
origins?: string[];
} | {
allowAll: true;
maxAge?: number;
}, typeof Dummy, typeof Dummy, typeof Dummy, typeof Dummy> Parameters
- config: {
allowAll: false;
credentials?: boolean;
exposeHeaders?: string[];
headers?: string[];
maxAge?: number;
methods?: string[];
origins?: string[];
} | {
allowAll: true;
maxAge?: number;
}
Returns UsableMiddleware<{
allowAll: false;
credentials?: boolean;
exposeHeaders?: string[];
headers?: string[];
maxAge?: number;
methods?: string[];
origins?: string[];
} | {
allowAll: true;
maxAge?: number;
}, typeof Dummy, typeof Dummy, typeof Dummy, typeof Dummy>