Package version:

Cross-Origin-Resource-Sharing policy

interface CorsPolicy {
    allowCredentials?: boolean;
    allowedHeaders?: string[];
    allowedMethods?: string[];
    allowedOrigins: string[];
    exposeHeaders?: string[];
    maxAge?: number;
}

Properties

allowCredentials?: boolean

Specifies whether the resource allows credentials

allowedHeaders?: string[]

Specifies the content for the access-control-allow-headers header

allowedMethods?: string[]

Specifies the content for the access-control-allow-methods header

allowedOrigins: string[]

Specifies the content for the access-control-allow-origins header

exposeHeaders?: string[]

Specifies the content for the access-control-expose-headers header

maxAge?: number

Specifies the content for the access-control-max-age header