feat: add HTTP-01 challenge support
This commit is contained in:
@@ -24,6 +24,7 @@ function applyOverrides(options: Record<string, unknown>): void {
|
||||
if (options['email']) process.env['ACME_CONTACT_EMAIL'] = String(options['email']);
|
||||
if (options['renewalThreshold']) process.env['ACME_RENEWAL_THRESHOLD_DAYS'] = String(options['renewalThreshold']);
|
||||
if (options['logLevel']) process.env['ACME_LOG_LEVEL'] = String(options['logLevel']);
|
||||
if (options['http']) process.env['ACME_HTTP_PORT'] = String(options['http']);
|
||||
}
|
||||
|
||||
const sharedOptions = (cmd: Command): Command =>
|
||||
@@ -44,6 +45,7 @@ sharedOptions(
|
||||
program
|
||||
.command('run', { isDefault: true })
|
||||
.description('Scan DNS zones and issue or renew certificates')
|
||||
.option('--http <port>', 'Use HTTP-01 challenge on the given port instead of DNS-01')
|
||||
.option('--dry-run', 'Show what would be done without making changes')
|
||||
).action(async (options: Record<string, unknown>) => {
|
||||
applyOverrides(options);
|
||||
@@ -104,6 +106,7 @@ sharedOptions(
|
||||
program
|
||||
.command('renew <domain>')
|
||||
.description('Force-renew a certificate for a specific domain, bypassing the renewal threshold')
|
||||
.option('--http <port>', 'Use HTTP-01 challenge on the given port instead of DNS-01')
|
||||
).action(async (domain: string, options: Record<string, unknown>) => {
|
||||
applyOverrides(options);
|
||||
const config = loadConfig();
|
||||
|
||||
Reference in New Issue
Block a user