fix: scope SNI to PostgreSQL per-host TLS config · bytebase/bytebase@502d0bf · GitHub
Skip to content

Commit 502d0bf

Browse files
ouchi2501claude
andcommitted
fix: scope SNI to PostgreSQL per-host TLS config
GetTLSConfig is shared by many drivers (MongoDB replica sets, Redis clusters, Cassandra contact points, etc.) that reuse one tls.Config for multiple target addresses. Setting ServerName there pinned SNI to the primary host for every handshake. Move the ServerName assignment into applyPGTLSConfigForHost, which is PostgreSQL-specific and runs per host (primary + fallbacks), so each target presents its own name and other drivers are unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3b88b10 commit 502d0bf

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

‎backend/plugin/db/util/ssl.go‎

Lines changed: 7 additions & 8 deletions

0 commit comments

Comments
 (0)