Skip to content

Commit

Permalink
fix TLS handshake issue in ingress
Browse files Browse the repository at this point in the history
  • Loading branch information
addozhang committed Sep 14, 2023
1 parent d77f3d6 commit 8553a2a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion charts/fsm/components/scripts/ingress/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

pipy({
_passthroughTarget: undefined,
_sni: undefined,
})
.export('main', {
__route: undefined,
Expand Down Expand Up @@ -65,9 +66,15 @@
))()
)
)
.handleTLSClientHello(
hello => (
_sni = hello?.serverNames?.[0]
)
)
.acceptTLS({
certificate: (sni, cert) => (
console.log('SNI', sni),
!sni && (sni = _sni),
console.log('SNI', sni),
sni && ((
Object.entries(certificates).find(
([k, v]) => (
Expand Down

0 comments on commit 8553a2a

Please sign in to comment.