integration: Avoid nghttpx accept-proxy-protocol option
This commit is contained in:
parent
b313386988
commit
5f2cf461e6
|
@ -103,6 +103,7 @@ func newServerTesterInternal(src_args []string, t *testing.T, handler http.Handl
|
||||||
backendTLS := false
|
backendTLS := false
|
||||||
dns := false
|
dns := false
|
||||||
externalDNS := false
|
externalDNS := false
|
||||||
|
acceptProxyProtocol := false
|
||||||
for _, k := range src_args {
|
for _, k := range src_args {
|
||||||
switch k {
|
switch k {
|
||||||
case "--http2-bridge":
|
case "--http2-bridge":
|
||||||
|
@ -112,6 +113,8 @@ func newServerTesterInternal(src_args []string, t *testing.T, handler http.Handl
|
||||||
case "--external-dns":
|
case "--external-dns":
|
||||||
dns = true
|
dns = true
|
||||||
externalDNS = true
|
externalDNS = true
|
||||||
|
case "--accept-proxy-protocol":
|
||||||
|
acceptProxyProtocol = true
|
||||||
default:
|
default:
|
||||||
args = append(args, k)
|
args = append(args, k)
|
||||||
}
|
}
|
||||||
|
@ -160,12 +163,17 @@ func newServerTesterInternal(src_args []string, t *testing.T, handler http.Handl
|
||||||
b += ";dns"
|
b += ";dns"
|
||||||
}
|
}
|
||||||
|
|
||||||
noTLS := "no-tls"
|
noTLS := ";no-tls"
|
||||||
if frontendTLS {
|
if frontendTLS {
|
||||||
noTLS = ""
|
noTLS = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
args = append(args, fmt.Sprintf("-f127.0.0.1,%v;%v", serverPort, noTLS), b,
|
var proxyProto string
|
||||||
|
if acceptProxyProtocol {
|
||||||
|
proxyProto = ";proxyproto"
|
||||||
|
}
|
||||||
|
|
||||||
|
args = append(args, fmt.Sprintf("-f127.0.0.1,%v%v%v", serverPort, noTLS, proxyProto), b,
|
||||||
"--errorlog-file="+logDir+"/log.txt", "-LINFO")
|
"--errorlog-file="+logDir+"/log.txt", "-LINFO")
|
||||||
|
|
||||||
authority := fmt.Sprintf("127.0.0.1:%v", connectPort)
|
authority := fmt.Sprintf("127.0.0.1:%v", connectPort)
|
||||||
|
|
Loading…
Reference in New Issue