Merge pull request #1179 from danielqsj/fix-sticky-upstream
Fix sticky upstream not used when enable rewrite
This commit is contained in:
commit
3549437af4
1 changed files with 2 additions and 2 deletions
|
@ -312,13 +312,13 @@ func buildProxyPass(host string, b interface{}, loc interface{}) string {
|
||||||
rewrite %s(.*) /$1 break;
|
rewrite %s(.*) /$1 break;
|
||||||
rewrite %s / break;
|
rewrite %s / break;
|
||||||
proxy_pass %s://%s;
|
proxy_pass %s://%s;
|
||||||
%v`, path, location.Path, proto, location.Backend, abu)
|
%v`, path, location.Path, proto, upstreamName, abu)
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Sprintf(`
|
return fmt.Sprintf(`
|
||||||
rewrite %s(.*) %s/$1 break;
|
rewrite %s(.*) %s/$1 break;
|
||||||
proxy_pass %s://%s;
|
proxy_pass %s://%s;
|
||||||
%v`, path, location.Redirect.Target, proto, location.Backend, abu)
|
%v`, path, location.Redirect.Target, proto, upstreamName, abu)
|
||||||
}
|
}
|
||||||
|
|
||||||
// default proxy_pass
|
// default proxy_pass
|
||||||
|
|
Loading…
Reference in a new issue