How do I specify multiple tls certificates to be used for different hostnames in a bun server? #8916
-
I can configure TLS as follows: const server = Bun.serve({
fetch: (request) => new Response("Welcome to Bun!"),
tls: {
cert: Bun.file("cert.pem"),
key: Bun.file("key.pem"),
},
}); My server needs multiple certificates, each to be used for a different hostname. Is there a way to do so? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
You need to implement the microservice architecture where each service has one or more Bun's server inside this service. Ex : navigate server, API server, websocket server, webhook server, ... and they are unique. And then, you implement multiple services that you have an ecosystem with multiple certificates, each to be used for a different hostname |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Thank you @truongan07. |
Beta Was this translation helpful? Give feedback.
Bun.serve() now supports Server Name Indication (SNI)