CorsConfiguration interface
服务实例的 CORS 配置设置。
属性
| allow |
如果允许通过 CORS 提供凭据。 |
| headers | 允许通过 CORS 的标头。 |
| max |
允许通过 CORS 的最大期限。 |
| methods | 允许通过 CORS 的方法。 |
| origins | 允许通过 CORS 的源。 |
属性详细信息
allowCredentials
如果允许通过 CORS 提供凭据。
allowCredentials?: boolean
属性值
boolean
headers
允许通过 CORS 的标头。
headers?: string[]
属性值
string[]
maxAge
允许通过 CORS 的最大期限。
maxAge?: number
属性值
number
methods
允许通过 CORS 的方法。
methods?: string[]
属性值
string[]
origins
允许通过 CORS 的源。
origins?: string[]
属性值
string[]