HTTP Header中支持设置非标Header

This commit is contained in:
刘祥超
2023-05-19 19:52:22 +08:00
parent e909d4c59a
commit 2af8e6c7f8
4 changed files with 234 additions and 82 deletions

View File

@@ -13,8 +13,9 @@ type HTTPHeaderPolicy struct {
SetHeaders []*HTTPHeaderConfig `yaml:"setHeaders" json:"setHeaders"`
DeleteHeaders []string `yaml:"deleteHeaders" json:"deleteHeaders"` // 删除的Header
Expires *HTTPExpireHeaderConfig `yaml:"expires" json:"expires"` // TODO
CORS *HTTPCORSHeaderConfig `yaml:"cors" json:"cors"`
Expires *HTTPExpireHeaderConfig `yaml:"expires" json:"expires"` // 内容过期设置 TODO
CORS *HTTPCORSHeaderConfig `yaml:"cors" json:"cors"` // CORS跨域设置
NonStandardHeaders []string `yaml:"nonStandardHeaders" json:"nonStandardHeaders"` // 非标Header列表
setHeaderNames []string
deleteHeaderMap map[string]bool // header => bool