chore(cr): additional logging comment

pull/399/head
Kobi Meirson 2022-11-05 16:53:36 +02:00
parent 269b34a821
commit c03f6848f4
No known key found for this signature in database
GPG Key ID: 5D66F732B037CDE1
1 changed files with 19 additions and 10 deletions

View File

@ -128,12 +128,17 @@ const httpRedirectConfig = (domain, global, ipPortPairs, domainName, redirectDom
config.push(['server_name', domainName]);
// Logging
if (domain.logging.redirectAccessLog.computed || domain.logging.redirectErrorLog.computed) {
config.push(['# logging', '']);
if (domain.logging.redirectAccessLog.computed) {
config.push(['access_log', getDomainAccessLog(domain, global)]);
}
if (domain.logging.redirectErrorLog.computed) {
config.push(['error_log', getDomainErrorLog(domain)]);
}
}
if (domain.https.certType.computed === 'letsEncrypt') {
// Let's encrypt
@ -420,12 +425,16 @@ export default (domain, domains, global, ipPortPairs) => {
redirectConfig.push(...sslConfig(domain, global));
// Logging
if (domain.logging.redirectAccessLog.computed || domain.logging.redirectErrorLog.computed) {
redirectConfig.push(['# logging', '']);
if (domain.logging.redirectAccessLog.computed) {
redirectConfig.push(['access_log', getDomainAccessLog(domain, global)]);
}
if (domain.logging.redirectErrorLog.computed) {
redirectConfig.push(['error_log', getDomainErrorLog(domain)]);
}
}
redirectConfig.push(['return',
`301 http${domain.https.https.computed ? 's' : ''}://${domain.server.wwwSubdomain.computed ? 'www.' : ''}${domain.server.domain.computed}$request_uri`]);