mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-02 14:40:26 +08:00
优化代码
This commit is contained in:
@@ -240,10 +240,10 @@ func (this *HTTPHeaderDAO) ComposeHeaderConfig(tx *dbs.Tx, headerId int64) (*sha
|
||||
config.Name = header.Name
|
||||
config.Value = header.Value
|
||||
config.DisableRedirect = header.DisableRedirect == 1
|
||||
config.ShouldAppend = header.ShouldAppend == 1
|
||||
config.ShouldAppend = header.ShouldAppend
|
||||
|
||||
// replace
|
||||
config.ShouldReplace = header.ShouldReplace == 1
|
||||
config.ShouldReplace = header.ShouldReplace
|
||||
if IsNotNull(header.ReplaceValues) {
|
||||
var values = []*shared.HTTPHeaderReplaceValue{}
|
||||
err = json.Unmarshal(header.ReplaceValues, &values)
|
||||
|
||||
@@ -14,8 +14,8 @@ type HTTPHeader struct {
|
||||
Order uint32 `field:"order"` // 排序
|
||||
Status dbs.JSON `field:"status"` // 状态码设置
|
||||
DisableRedirect uint8 `field:"disableRedirect"` // 是否不支持跳转
|
||||
ShouldAppend uint8 `field:"shouldAppend"` // 是否为附加
|
||||
ShouldReplace uint8 `field:"shouldReplace"` // 是否替换变量
|
||||
ShouldAppend bool `field:"shouldAppend"` // 是否为附加
|
||||
ShouldReplace bool `field:"shouldReplace"` // 是否替换变量
|
||||
ReplaceValues dbs.JSON `field:"replaceValues"` // 替换的值
|
||||
Methods dbs.JSON `field:"methods"` // 支持的方法
|
||||
Domains dbs.JSON `field:"domains"` // 支持的域名
|
||||
|
||||
Reference in New Issue
Block a user