From 8c2ba51dce6df312996fe92d8e54361c80340792 Mon Sep 17 00:00:00 2001 From: Ivan Efremov Date: Tue, 29 Apr 2025 10:12:57 +0300 Subject: [PATCH] refc(proxy): Remove backward compatibility for console-redirect Remove conditions since we use console redirect proxy only with pg_sni_proxy. --- proxy/src/auth/backend/console_redirect.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/proxy/src/auth/backend/console_redirect.rs b/proxy/src/auth/backend/console_redirect.rs index dd48384c03..a286a33828 100644 --- a/proxy/src/auth/backend/console_redirect.rs +++ b/proxy/src/auth/backend/console_redirect.rs @@ -207,15 +207,8 @@ async fn authenticate( ctx.set_project(db_info.aux.clone()); info!("woken up a compute node"); - // Backwards compatibility. pg_sni_proxy uses "--" in domain names - // while direct connections do not. Once we migrate to pg_sni_proxy - // everywhere, we can remove this. - if db_info.host.contains("--") { - // we need TLS connection with SNI info to properly route it - config.ssl_mode(SslMode::Require); - } else { - config.ssl_mode(SslMode::Disable); - } + // we need TLS connection with SNI info to properly route it + config.ssl_mode(SslMode::Require); if let Some(password) = db_info.password { config.password(password.as_ref());