Commit 767967c3 authored by Rohith's avatar Rohith
Browse files

Proxy Protocol

- porting the fix to the proxy protocol
parent bfe20b84
......@@ -24,7 +24,7 @@ import (
)
var (
release = "v2.0.4"
release = "v2.0.7"
gitsha = "no gitsha provided"
version = release + " (git+sha: " + gitsha + ")"
)
......
......@@ -379,6 +379,12 @@ func createHTTPListener(config listenerConfig) (net.Listener, error) {
}
}
// step: does it require proxy protocol?
if config.proxyProtocol {
log.Infof("enabling the proxy protocol on listener: %s", config.listen)
listener = &proxyproto.Listener{Listener: listener}
}
// step: does the socket require TLS?
if config.certificate != "" && config.privateKey != "" {
log.Infof("tls enabled, certificate: %s, key: %s", config.certificate, config.privateKey)
......@@ -410,12 +416,6 @@ func createHTTPListener(config listenerConfig) (net.Listener, error) {
}
}
// step: does it require proxy protocol?
if config.proxyProtocol {
log.Infof("enabling the proxy protocol on listener: %s", config.listen)
listener = &proxyproto.Listener{Listener: listener}
}
return listener, nil
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment