Default backend protocol only supports http (#4870)
This commit is contained in:
parent
eb3fd57bd2
commit
965ecd4b15
1 changed files with 6 additions and 0 deletions
|
@ -520,6 +520,12 @@ func buildProxyPass(host string, b interface{}, loc interface{}) string {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: add support for custom protocols
|
||||
if location.Backend == "upstream-default-backend" {
|
||||
proto = "http://"
|
||||
proxyPass = "proxy_pass"
|
||||
}
|
||||
|
||||
// defProxyPass returns the default proxy_pass, just the name of the upstream
|
||||
defProxyPass := fmt.Sprintf("%v %s%s;", proxyPass, proto, upstreamName)
|
||||
|
||||
|
|
Loading…
Reference in a new issue