settings: move reverse proxy config
This commit is contained in:
@@ -87,9 +87,15 @@ function getCertificateDatesSync(cert) {
|
||||
return { startDate: notBeforeDate, endDate: notAfterDate };
|
||||
}
|
||||
|
||||
async function getReverseProxyConfig() {
|
||||
const value = await settings.get(settings.REVERSE_PROXY_CONFIG_KEY);
|
||||
if (value === null) return { ocsp: true };
|
||||
return JSON.parse(value);
|
||||
}
|
||||
|
||||
async function isOcspEnabled(certFilePath) {
|
||||
// on some servers, OCSP does not work. see #796
|
||||
const config = await settings.getReverseProxyConfig();
|
||||
const config = await getReverseProxyConfig();
|
||||
if (!config.ocsp) return false;
|
||||
|
||||
// We used to check for the must-staple in the cert using openssl x509 -text -noout -in ${certFilePath} | grep -q status_request
|
||||
|
||||
Reference in New Issue
Block a user