Fix X-Forwarded-Proto based on proxy-protocol server port

This commit is contained in:
Ilya Nemakov 2020-02-09 21:14:05 +03:00
parent e5aaf15639
commit 46a3e0a6fd
3 changed files with 41 additions and 0 deletions

View file

@ -275,6 +275,7 @@ func configForLua(input interface{}) string {
return fmt.Sprintf(`{
use_forwarded_headers = %t,
use_proxy_protocol = %t,
is_ssl_passthrough_enabled = %t,
http_redirect_code = %v,
listen_ports = { ssl_proxy = "%v", https = "%v" },
@ -285,6 +286,7 @@ func configForLua(input interface{}) string {
hsts_preload = %t,
}`,
all.Cfg.UseForwardedHeaders,
all.Cfg.UseProxyProtocol,
all.IsSSLPassthroughEnabled,
all.Cfg.HTTPRedirectCode,
all.ListenPorts.SSLProxy,