实现gzip

This commit is contained in:
GoEdgeLab
2020-09-29 17:22:33 +08:00
parent b2fa7c01ba
commit add9c74761
10 changed files with 47 additions and 45 deletions

View File

@@ -31,7 +31,7 @@ func (this *HTTPAccessLogPolicyService) FindAllEnabledHTTPAccessLogPolicies(ctx
IsOn: policy.IsOn == 1,
Type: policy.Name,
OptionsJSON: []byte(policy.Options),
CondsJSON: []byte(policy.CondGroups),
CondsJSON: []byte(policy.Conds),
})
}

View File

@@ -42,7 +42,7 @@ func (this *HTTPGzipService) CreateHTTPGzip(ctx context.Context, req *pb.CreateH
}
}
gzipId, err := models.SharedHTTPGzipDAO.CreateGzip(int(req.Level), minLengthJSON, maxLengthJSON, req.CondGroupsJSON)
gzipId, err := models.SharedHTTPGzipDAO.CreateGzip(int(req.Level), minLengthJSON, maxLengthJSON, req.CondsJSON)
if err != nil {
return nil, err
}
@@ -100,7 +100,7 @@ func (this *HTTPGzipService) UpdateHTTPGzip(ctx context.Context, req *pb.UpdateH
}
}
err = models.SharedHTTPGzipDAO.UpdateGzip(req.GzipId, int(req.Level), minLengthJSON, maxLengthJSON, req.CondGroupsJSON)
err = models.SharedHTTPGzipDAO.UpdateGzip(req.GzipId, int(req.Level), minLengthJSON, maxLengthJSON, req.CondsJSON)
if err != nil {
return nil, err
}