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

This commit is contained in:
刘祥超
2023-05-19 16:32:28 +08:00
parent 79b4054e31
commit 1f5894ff82
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())