Fix error getting class information from Ingress annotations

This commit is contained in:
Manuel de Brito Fontes 2017-02-14 11:02:23 -03:00
parent aa02b7e085
commit 5c9bf12648
7 changed files with 46 additions and 5 deletions

View file

@ -92,7 +92,11 @@ func (a authReq) Parse(ing *extensions.Ingress) (interface{}, error) {
return nil, ing_errors.NewLocationDenied("invalid url host")
}
m, _ := parser.GetStringAnnotation(authMethod, ing)
m, err := parser.GetStringAnnotation(authMethod, ing)
if err != nil {
return nil, err
}
if len(m) != 0 && !validMethod(m) {
return nil, ing_errors.NewLocationDenied("invalid HTTP method")
}