diff --git a/controllers/nginx/pkg/template/template.go b/controllers/nginx/pkg/template/template.go index 8acb192bf..ea917ab5e 100644 --- a/controllers/nginx/pkg/template/template.go +++ b/controllers/nginx/pkg/template/template.go @@ -301,7 +301,7 @@ func buildProxyPass(host string, b interface{}, loc interface{}) string { return defProxyPass } - if path != slash && !strings.HasSuffix(path, slash) { + if !strings.HasSuffix(path, slash) { path = fmt.Sprintf("%s/", path) }