*Add method to check if we are in staging mode for ssl
This commit is contained in:
parent
ea4a993182
commit
e44a87e379
|
@ -30,8 +30,7 @@ const sslParams: tls.SecureContextOptions = { cert: "", key: "" };
|
|||
const sslPrivateKey = await acme.forge.createPrivateKey();
|
||||
const acmeClient = new acme.Client({
|
||||
accountKey: sslPrivateKey,
|
||||
directoryUrl:
|
||||
config.str("ssl-mode") === "staging"
|
||||
directoryUrl: isSSlStaging()
|
||||
? acme.directory.letsencrypt.staging
|
||||
: acme.directory.letsencrypt.production,
|
||||
});
|
||||
|
@ -227,3 +226,7 @@ function getSeed(): Uint8Array {
|
|||
|
||||
return seed;
|
||||
}
|
||||
|
||||
function isSSlStaging() {
|
||||
return config.str("ssl-mode") === "staging";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue