Variable Cors

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
    • 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>