@backblaze-labs/b2-sdk - v0.4.0
    Preparing search index...

    Interface CorsRule

    Cross-Origin Resource Sharing (CORS) rule for browser-based access to a bucket. A bucket may have up to CORS_RULES_MAX_COUNT rules, and each rule's name, allowed origins, allowed operations, allowed headers, and exposed headers must total less than CORS_RULE_MAX_BYTES UTF-8 bytes.

    interface CorsRule {
        allowedHeaders?: readonly string[] | null;
        allowedOperations: readonly (
            | "b2_upload_file"
            | "b2_upload_part"
            | "b2_download_file_by_name"
            | "b2_download_file_by_id"
            | "s3_get"
            | "s3_put"
            | "s3_head"
            | "s3_delete"
        )[];
        allowedOrigins: readonly string[];
        corsRuleName: string;
        exposeHeaders?: readonly string[]
        | null;
        maxAgeSeconds: number;
    }
    Index
    allowedHeaders?: readonly string[] | null

    Request headers allowed in preflight requests, or null/omitted if none are allowed.

    allowedOperations: readonly (
        | "b2_upload_file"
        | "b2_upload_part"
        | "b2_download_file_by_name"
        | "b2_download_file_by_id"
        | "s3_get"
        | "s3_put"
        | "s3_head"
        | "s3_delete"
    )[]

    B2 and S3 operations permitted by this rule. At least one operation is required, and every value must be from CORS_ALLOWED_OPERATIONS.

    allowedOrigins: readonly string[]

    Origins allowed to make cross-origin requests (e.g., 'https://example.com'). At least one origin is required.

    corsRuleName: string

    Unique name identifying this CORS rule within the bucket. Must be 6-63 characters, match [A-Za-z0-9-], and not start with b2-.

    exposeHeaders?: readonly string[] | null

    Response headers exposed to the browser, or null/omitted if none are exposed.

    maxAgeSeconds: number

    Maximum time (0-86400 seconds) browsers may cache the preflight response.