CorsRule interface
指定 Blob 服务的 CORS 规则。
属性
| allowed |
如果存在 CorsRule 元素,则为必需。 允许作为跨域请求的一部分的标头列表。 |
| allowed |
如果存在 CorsRule 元素,则为必需。 源允许执行的 HTTP 方法的列表。 |
| allowed |
如果存在 CorsRule 元素,则为必需。 将允许通过 CORS 或“*”允许所有域的源域列表 |
| exposed |
如果存在 CorsRule 元素,则为必需。 要向 CORS 客户端公开的响应标头列表。 |
| max |
如果存在 CorsRule 元素,则为必需。 客户端/浏览器应缓存预检响应的秒数。 |
属性详细信息
allowedHeaders
如果存在 CorsRule 元素,则为必需。 允许作为跨域请求的一部分的标头列表。
allowedHeaders: string[]
属性值
string[]
allowedMethods
如果存在 CorsRule 元素,则为必需。 源允许执行的 HTTP 方法的列表。
allowedMethods: string[]
属性值
string[]
allowedOrigins
如果存在 CorsRule 元素,则为必需。 将允许通过 CORS 或“*”允许所有域的源域列表
allowedOrigins: string[]
属性值
string[]
exposedHeaders
如果存在 CorsRule 元素,则为必需。 要向 CORS 客户端公开的响应标头列表。
exposedHeaders: string[]
属性值
string[]
maxAgeInSeconds
如果存在 CorsRule 元素,则为必需。 客户端/浏览器应缓存预检响应的秒数。
maxAgeInSeconds: number
属性值
number