Skip to content

Commit

Permalink
fix TLS handshake issue in ingress (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
addozhang authored Sep 14, 2023
1 parent d77f3d6 commit 15a6711
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Binary file modified charts/fsm/components/scripts.tar.gz
Binary file not shown.
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 15a6711

Please sign in to comment.