{"version":"1.0","type":"rich","title":"Gist 4985631","description":"This example demonstrates how to configure a Node.js HTTPS server with Server Name Indication (SNI) to serve multiple SSL certificates for different hostnames. It shows the setup for routing requests to distinct backend ports using the http-proxy library, with an SNICallback that selects the appropriate certificate context based on the incoming hostname. The code uses Node.js core `crypto.createCredentials` and `fs.readFileSync`, along with a custom `getCABundle` function that parses a bundled certificate file into an array by splitting on the `-END CERTIFICATE-` marker. It explicitly maps example-a.com and example-b.com to localhost ports 10000 and 10001.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-4985631?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}