Skip to content

Commit

Permalink
Merge pull request #1179 from danielqsj/fix-sticky-upstream
Browse files Browse the repository at this point in the history
Fix sticky upstream not used when enable rewrite
  • Loading branch information
aledbf authored Aug 18, 2017
2 parents e80769f + d996a25 commit 3549437
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/nginx/pkg/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,13 @@ func buildProxyPass(host string, b interface{}, loc interface{}) string {
rewrite %s(.*) /$1 break;
rewrite %s / break;
proxy_pass %s://%s;
%v`, path, location.Path, proto, location.Backend, abu)
%v`, path, location.Path, proto, upstreamName, abu)
}

return fmt.Sprintf(`
rewrite %s(.*) %s/$1 break;
proxy_pass %s://%s;
%v`, path, location.Redirect.Target, proto, location.Backend, abu)
%v`, path, location.Redirect.Target, proto, upstreamName, abu)
}

// default proxy_pass
Expand Down

0 comments on commit 3549437

Please sign in to comment.