优化HTTP报头界面

This commit is contained in:
GoEdgeLab
2023-07-03 15:21:46 +08:00
parent 9589d58fb8
commit 350e964413
4 changed files with 15 additions and 5 deletions

View File

@@ -29,6 +29,8 @@ func (this *CreateSetPopupAction) RunGet(params struct {
}
func (this *CreateSetPopupAction) RunPost(params struct {
Type string
HeaderPolicyId int64
Name string
Value string
@@ -44,7 +46,11 @@ func (this *CreateSetPopupAction) RunPost(params struct {
Must *actions.Must
}) {
// 日志
defer this.CreateLogInfo(codes.ServerHTTPHeader_LogCreateSettingHeader, params.HeaderPolicyId, params.Name, params.Value)
if params.Type == "request" {
defer this.CreateLogInfo(codes.ServerHTTPHeader_LogCreateSettingRequestHeader, params.HeaderPolicyId, params.Name, params.Value)
} else {
defer this.CreateLogInfo(codes.ServerHTTPHeader_LogCreateSettingResponseHeader, params.HeaderPolicyId, params.Name, params.Value)
}
params.Name = strings.TrimSuffix(params.Name, ":")