Adds buttons to test availability of server from public internet

This commit is contained in:
Julian Reinhardt
2021-10-31 00:19:18 +02:00
parent d0bfa082e0
commit c55476b196
12 changed files with 288 additions and 7 deletions

View File

@ -68,6 +68,32 @@ router
.catch(next);
});
/**
* Test HTTP challenge for domains
*
* /api/nginx/certificates/test-http
*/
router
.route('/test-http')
.options((req, res) => {
res.sendStatus(204);
})
.all(jwtdecode())
/**
* GET /api/nginx/certificates/test-http
*
* Test HTTP challenge for domains
*/
.get((req, res, next) => {
internalCertificate.testHttpsChallenge(res.locals.access, JSON.parse(req.query.domains))
.then((result) => {
res.status(200)
.send(result);
})
.catch(next);
});
/**
* Specific certificate
*
@ -209,7 +235,6 @@ router
.catch(next);
});
/**
* Download LE Certs
*