--- name: Configure TLS on an HTTP server --- Set the `tls` key to configure TLS. Both `key` and `cert` are required. The `key` should be the contents of your private key; `cert` should be the contents of your issued certificate. Use [`Bun.file()`](/docs/api/file-io#reading-files-bun-file) to read the contents. ```ts const server = Bun.serve({ fetch: (request) => new Response("Welcome to Bun!"), tls: { cert: Bun.file("cert.pem"), key: Bun.file("key.pem"), }, }); ``` --- By default Bun trusts the default Mozilla-curated list of well-known root CAs. To override this list, pass an array of certificates as `ca`. ```ts const server = Bun.serve({ fetch: (request) => new Response("Welcome to Bun!"), tls: { cert: Bun.file("cert.pem"), key: Bun.file("key.pem"), ca: [Bun.file("ca1.pem"), Bun.file("ca2.pem")], }, }); ``` tity-CN Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/integration/snapshots/export-default-module-hot.hmr.debug.js (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-04-01[bun.js] Expose `ErrorEvent`Gravatar Jarred Sumner 2-37/+52
2022-04-01[bun.js] Use `Headers` from WebKit instead of customGravatar Jarred Sumner 44-843/+5918
2022-03-31Update WebKitGravatar Jarred Sumner 1-0/+0
2022-03-31Delete unusedGravatar Jarred Sumner 1-5/+0
2022-03-31Allow a little leeway when HMRGravatar Jarred Sumner 1-1/+2
2022-03-31Fix more infinite loopsGravatar Jarred Sumner 1-2/+2
2022-03-31Bugfixes to how we build WebCore codeGravatar Jarred Sumner 29-170/+384
2022-03-31[bun dev] Re-create the shared buffer for each websocketGravatar Jarred Sumner 1-6/+5
2022-03-31[bun dev] Improve HMR reliability when filesystem is slow or reading large filesGravatar Jarred Sumner 2-19/+68
2022-03-31Fix possible infinite loopsGravatar Jarred Sumner 1-3/+3
2022-03-30Update bindings.cppGravatar Jarred Sumner 1-0/+24
2022-03-30[bun.js] Support `file://` URLs in node fsGravatar Jarred Sumner 9-6/+102
2022-03-30Bump target next version to 12.1.3Gravatar Jarred Sumner 1-1/+1
2022-03-30Add test for Bun.hash that runs it with a Uint8ArrayGravatar Jarred Sumner 1-8/+16