CorsPolicy interface

Cross-Origin-Resource-Sharing policy

Properties

allowCredentials

Specifies whether the resource allows credentials

allowedHeaders

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

allowedMethods

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

allowedOrigins

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

exposeHeaders

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

maxAge

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

Property Details

allowCredentials

Specifies whether the resource allows credentials

allowCredentials?: boolean

Property Value

boolean

allowedHeaders

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

allowedHeaders?: string[]

Property Value

string[]

allowedMethods

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

allowedMethods?: string[]

Property Value

string[]

allowedOrigins

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

allowedOrigins: string[]

Property Value

string[]

exposeHeaders

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

exposeHeaders?: string[]

Property Value

string[]

maxAge

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

maxAge?: number

Property Value

number