Lint code
This commit is contained in:
parent
875fd778e1
commit
b7b41248cb
7 changed files with 8 additions and 15 deletions
|
|
@ -160,7 +160,7 @@ func (a authReq) Parse(ing *extensions.Ingress) (interface{}, error) {
|
|||
|
||||
harr := strings.Split(hstr, ",")
|
||||
for _, header := range harr {
|
||||
header := strings.TrimSpace(header)
|
||||
header = strings.TrimSpace(header)
|
||||
if len(header) > 0 {
|
||||
if !validHeader(header) {
|
||||
return nil, ing_errors.NewLocationDenied("invalid headers list")
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ func (a ratelimit) Parse(ing *extensions.Ingress) (interface{}, error) {
|
|||
LimitRate: lr,
|
||||
LimitRateAfter: lra,
|
||||
Name: zoneName,
|
||||
ID: base64.Base64Encode(zoneName),
|
||||
ID: base64.Encode(zoneName),
|
||||
Whitelist: cidrs,
|
||||
}, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue