clear the timeout just to be safe
This commit is contained in:
@@ -160,6 +160,9 @@ function checkDnsRecords(req, res, next) {
|
||||
|
||||
if (!('subdomain' in req.query)) return next(new HttpError(400, 'subdomain is required'));
|
||||
|
||||
// some DNS providers like DigitalOcean take a really long time to verify credentials (https://github.com/expressjs/timeout/issues/26)
|
||||
req.clearTimeout();
|
||||
|
||||
domains.checkDnsRecords(req.query.subdomain, req.params.domain, function (error, result) {
|
||||
if (error && error.reason === DomainsError.NOT_FOUND) return next(new HttpError(404, error.message)); // domain (and not record!) not found
|
||||
if (error && error.reason === DomainsError.EXTERNAL_ERROR) return next(new HttpError(424, error.message));
|
||||
|
||||
Reference in New Issue
Block a user