Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v10] Return Public Web Port in TLS mode for postgres when listen addr specified. #22891

Merged
merged 4 commits into from
Mar 10, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4025,7 +4025,8 @@ func (tc *TeleportClient) applyProxySettings(proxySettings webclient.ProxySettin
proxySettings.DB.PostgresPublicAddr)
}
tc.PostgresProxyAddr = net.JoinHostPort(addr.Host(), strconv.Itoa(addr.Port(tc.WebProxyPort())))
case proxySettings.DB.PostgresListenAddr != "":
// Listen address port applies if set and not in TLS routing mode.
case proxySettings.DB.PostgresListenAddr != "" && !proxySettings.TLSRoutingEnabled:
addr, err := utils.ParseAddr(proxySettings.DB.PostgresListenAddr)
if err != nil {
return trace.BadParameter("failed to parse Postgres listen address received from server: %q, contact your administrator for help",
Expand Down