You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need a way to serve non-Letsencrypt certs together with the one managed by Greenlock. I can't find any suitable way, so I propose these little changes here: e63cdf2
with this changes, I will "ready" this HTTP(s) worker to greenlock-express
const greenlock = Greenlock
.init({ ... })
.ready(httpsWorker);
function httpsWorker(glx) {
const plainServer = glx.httpServer();
plainServer.listen(plainPort, plainAddr, () => {
logger.info(`Greenlock listening on ${plainAddr}:${plainPort} for ACME challenges, and redirecting to HTTPS`);
const secureServer = glx.httpsServer({ SNICallback }, app);
secureServer.listen(securePort, secureAddr, () => {
logger.info(`Greenlock listening on ${secureAddr}:${securePort} for secure traffic`);
});
});
}
And then provided my own SNICallback() like so
function SNICallback(greenlock, secureOpts, sni) {
function SNIFallback(servername, cb) {
return sni.create(greenlock, secureOpts)(servername, cb);
}
return (servername, cb) => {
// Do something or return SNIFallback(servername, cb)
}
}
Each time someone visits the secure port, it'll run my callback first and return it's secureContext if available, or continue to Greenlock SNI Callback as usual.
Let me know what you think
The text was updated successfully, but these errors were encountered:
I need a way to serve non-Letsencrypt certs together with the one managed by Greenlock. I can't find any suitable way, so I propose these little changes here: e63cdf2
with this changes, I will "ready" this HTTP(s) worker to greenlock-express
And then provided my own SNICallback() like so
Each time someone visits the secure port, it'll run my callback first and return it's secureContext if available, or continue to Greenlock SNI Callback as usual.
Let me know what you think
The text was updated successfully, but these errors were encountered: