reverseproxy: move renew and trusted ip routes

This commit is contained in:
Girish Ramakrishnan
2023-08-04 13:19:48 +05:30
parent a49cb0b080
commit 1264cd1dd7
8 changed files with 64 additions and 47 deletions
+11
View File
@@ -13,6 +13,7 @@ exports = module.exports = {
ensureCertificate,
startRenewCerts,
checkCerts,
// the 'configure' functions ensure a certificate and generate nginx config
@@ -55,6 +56,7 @@ const acme2 = require('./acme2.js'),
safe = require('safetydance'),
settings = require('./settings.js'),
shell = require('./shell.js'),
tasks = require('./tasks.js'),
util = require('util'),
validator = require('validator');
@@ -676,6 +678,15 @@ async function checkCerts(options, auditSource, progressCallback) {
await cleanupCerts(locations, auditSource, progressCallback);
}
async function startRenewCerts(options, auditSource) {
assert.strictEqual(typeof options, 'object');
assert.strictEqual(typeof auditSource, 'object');
const taskId = await tasks.add(tasks.TASK_CHECK_CERTS, [ options, auditSource ]);
tasks.startTask(taskId, {});
return taskId;
}
function removeAppConfigs() {
debug('removeAppConfigs: removing app nginx configs');