Skip to content

Commit

Permalink
Add hook for configuring ssl AFTER listen on 80, BEFORE listen on 443
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbert committed Oct 8, 2024
1 parent 292a8d5 commit c7656e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bin/start/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ function render(r) {

async function listenHttps() {
isMainThread && config.acme.domains.length && await runAcme()
server.configureSsl && await server.configureSsl(router)
sslListener && (sslListener.unlisten(), sslListener = null)
sslListener = await router.listen(config.httpsPort, config.address, config.ssl)
console.log('HTTPS Listening on', config.httpsPort) // eslint-disable-line
Expand Down

0 comments on commit c7656e7

Please sign in to comment.