Skip to content
Snippets Groups Projects
Commit 767967c3 authored by Rohith's avatar Rohith
Browse files

Proxy Protocol

- porting the fix to the proxy protocol
parent bfe20b84
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment