CorsSettings interface
应用的跨域资源共享(CORS)设置。
属性
| allowed |
获取或设置应允许进行跨域调用的源列表(例如: |
| support |
获取或设置是否允许使用凭据的 CORS 请求。 有关详细信息,请参阅 https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials。 |
属性详细信息
allowedOrigins
获取或设置应允许进行跨域调用的源列表(例如:http://example.com:12345)。 使用“*”允许所有。
allowedOrigins?: string[]
属性值
string[]
supportCredentials
获取或设置是否允许使用凭据的 CORS 请求。 有关详细信息,请参阅 https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials。
supportCredentials?: boolean
属性值
boolean