*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 sslPrivateKey = await acme.forge.createPrivateKey();
|
||||||
const acmeClient = new acme.Client({
|
const acmeClient = new acme.Client({
|
||||||
accountKey: sslPrivateKey,
|
accountKey: sslPrivateKey,
|
||||||
directoryUrl:
|
directoryUrl: isSSlStaging()
|
||||||
config.str("ssl-mode") === "staging"
|
|
||||||
? acme.directory.letsencrypt.staging
|
? acme.directory.letsencrypt.staging
|
||||||
: acme.directory.letsencrypt.production,
|
: acme.directory.letsencrypt.production,
|
||||||
});
|
});
|
||||||
|
@ -227,3 +226,7 @@ function getSeed(): Uint8Array {
|
||||||
|
|
||||||
return seed;
|
return seed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isSSlStaging() {
|
||||||
|
return config.str("ssl-mode") === "staging";
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue