HTTP Header - CORS跨域设置增加多个选项

This commit is contained in:
GoEdgeLab
2023-05-19 16:32:28 +08:00
parent 3095bc9773
commit bc262d00ed
3 changed files with 97 additions and 9 deletions

View File

@@ -49,7 +49,7 @@ func (this *UpdateCORSPopupAction) RunPost(params struct {
Must *actions.Must
CSRF *actionutils.CSRF
}) {
var config = &shared.HTTPCORSHeaderConfig{}
var config = shared.NewHTTPCORSHeaderConfig()
err := json.Unmarshal(params.CorsJSON, config)
if err != nil {
this.Fail("配置校验失败:" + err.Error())