Permalink
Browse files

Allow changing ACME_DIRECTORY_URL from env var (#24)

* Allow changing ACME_DIRECTORY_URL from env var

* Use const instead of let, good catch
  • Loading branch information...
GabLeRoux authored and larryboymi committed Jul 30, 2018
1 parent c204b0e commit be6989a57db3f6ae0fca44e439ce0dc1a8de0ee3
Showing with 4 additions and 1 deletion.
  1. +4 −1 config.js
View
@@ -3,6 +3,9 @@ const defaultCertInfo = {
'cert-name2': ['<third-domain-needing-certificate>', '<fourth-domain-needing-certificate>']
}
const productionDirectoryUrl = process.env.ACME_DIRECTORY_URL || 'https://acme-v01.api.letsencrypt.org'
const stagingDirectoryUrl = process.env.ACME_DIRECTORY_URL || 'https://acme-staging.api.letsencrypt.org'
module.exports = {
's3-account-bucket': process.env.S3_ACCOUNT_BUCKET || '<your-s3-account-config-bucket>',
's3-cert-bucket': process.env.S3_CERT_BUCKET || '<your-s3-ssl-cert-bucket>',
@@ -13,6 +16,6 @@ module.exports = {
'acme-account-file': process.env.ACME_ACCOUNT_FILE || '<where-to-save-generated-account-registration>',
'acme-account-email': process.env.ACME_ACCOUNT_EMAIL || '<email-of-responsible-person>',
'acme-account-key-bits': 2048,
'acme-directory-url': process.env.USE_PRODUCTION ? 'https://acme-v01.api.letsencrypt.org' : 'https://acme-staging.api.letsencrypt.org',
'acme-directory-url': process.env.USE_PRODUCTION ? productionDirectoryUrl : stagingDirectoryUrl,
'region': process.env.AWS_REGION || 'us-east-1'
}

0 comments on commit be6989a

Please sign in to comment.