alibaba / alibaba/virtual-environment
kt-virtual-environment/rule配置不支持corsPolicy.allowOrigins属性
- Dominant language
- Go
- Stars
- 222
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
使用如下json:
```json
{
"Match": [
{
"Uri": {
"Prefix": "/"
}
}
],
"corsPolicy": {
"allowOrigins": [
{
"exact": "*"
}
],
"allowCredentials": true,
"allowHeaders": [
"app-key",
"yizhou-j-token"
],
"allowMethods": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"OPTIONS"
]
}
}
```
最后生成的配置

此段json未生效 `"corsPolicy":{"allowOrigins":[{"exact":"*"}]`,缺失以下配置:
```yaml
allowOrigins:
- exact: '*'
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue using the JSON configuration shown and compare it with the generated YAML. Trace how rule configuration handles corsPolicy.allowOrigins; the fix is complete when the generated configuration preserves allowOrigins with the exact value '*', and the behavior is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100