|
名称 |
类型 |
描述 |
示例值 |
|---|---|---|---|
|
object |
CORS 配置 |
||
| allowCredentials |
boolean |
是否允许发送凭据 |
true |
| allowHeaders |
array |
允许的请求头列表 |
["Content-Type", "Authorization"] |
|
string |
|||
| allowMethods |
array |
允许的 HTTP 方法列表 |
["GET", "POST", "OPTIONS"] |
|
string |
|||
| allowOrigins |
array |
允许的来源列表 |
["https://example.com", "https://app.example.com"] |
|
string |
|||
| exposeHeaders |
array |
暴露的响应头列表 |
["X-Custom-Header"] |
|
string |
|||
| maxAge |
integer |
预检请求缓存时间(秒) |
3600 |
该文章对您有帮助吗?