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 and reaver-flomesh committed Sep 14, 2023
1 parent 542df32 commit a846d5b
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 a846d5b

Please sign in to comment.