[FIX] invalid ingress

This commit is contained in:
huangrh 2019-03-27 12:17:32 +08:00
parent 71af2cfe2f
commit 59fff24ef3

View File

@ -611,6 +611,9 @@ func (g *GatewayAction) RuleConfig(req *apimodel.RuleConfigReq) error {
})
setheaders := make(map[string]string)
for _, item := range req.Body.SetHeaders {
if strings.TrimSpace(item.Key) == "" || strings.TrimSpace(item.Value) == "" {
continue
}
// filter same key
setheaders["set-header-"+item.Key] = item.Value
}