Fix X-Forwarded-Proto based on proxy-protocol server port
This commit is contained in:
parent
e5aaf15639
commit
46a3e0a6fd
3 changed files with 41 additions and 0 deletions
|
|
@ -123,6 +123,12 @@ function _M.rewrite(location_config)
|
|||
end
|
||||
end
|
||||
|
||||
if config.use_proxy_protocol then
|
||||
if ngx.var.proxy_protocol_server_port == "443" then
|
||||
ngx.var.pass_access_scheme = "https"
|
||||
end
|
||||
end
|
||||
|
||||
ngx.var.pass_port = ngx.var.pass_server_port
|
||||
if config.is_ssl_passthrough_enabled then
|
||||
if ngx.var.pass_server_port == config.listen_ports.ssl_proxy then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue