Make TLS optional when certs don't exist
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
789825614e
commit
4b8ca04f25
|
|
@ -22,12 +22,16 @@ app.get('/ggwave.js', () =>
|
|||
|
||||
startup(PORT)
|
||||
|
||||
const hasCerts = await Bun.file('./certs/cert.pem').exists()
|
||||
|
||||
export default {
|
||||
...app.defaults,
|
||||
port: PORT,
|
||||
idleTimeout: 255,
|
||||
...(hasCerts && {
|
||||
tls: {
|
||||
key: Bun.file('./certs/key.pem'),
|
||||
cert: Bun.file('./certs/cert.pem'),
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user