reverseproxy: rebuild only when needed
re-creating nginx configs is only needed in 3 cases: * provider changes. we create a rebuild file for this * nginx config is somehow corrupt by external changes. user can click ui button on startup, dashboard also always creates the nginx configs. so it's always up to provide the button
This commit is contained in:
@@ -300,7 +300,9 @@ async function prepareDashboardDomain(req, res, next) {
|
||||
}
|
||||
|
||||
async function renewCerts(req, res, next) {
|
||||
const [error, taskId] = await safe(cloudron.renewCerts(AuditSource.fromRequest(req)));
|
||||
if ('rebuild' in req.body && typeof req.body !== 'boolean') return next(new HttpError(400, 'rebuild must be a boolean'));
|
||||
|
||||
const [error, taskId] = await safe(cloudron.renewCerts(req.body, AuditSource.fromRequest(req)));
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(202, { taskId }));
|
||||
|
||||
Reference in New Issue
Block a user