chore: use new flag names to allow backward compatability
parent
550e36d461
commit
7cd2d1804b
|
@ -33,13 +33,13 @@ export default (domains, global) => {
|
||||||
config['location = /favicon.ico'] = {
|
config['location = /favicon.ico'] = {
|
||||||
log_not_found: 'off',
|
log_not_found: 'off',
|
||||||
};
|
};
|
||||||
if (global.logging.accessLog.computed) config['location = /favicon.ico'].access_log = 'off';
|
if (global.logging.accessLogEnabled.computed) config['location = /favicon.ico'].access_log = 'off';
|
||||||
|
|
||||||
config['# robots.txt'] = '';
|
config['# robots.txt'] = '';
|
||||||
config['location = /robots.txt'] = {
|
config['location = /robots.txt'] = {
|
||||||
log_not_found: 'off',
|
log_not_found: 'off',
|
||||||
};
|
};
|
||||||
if (global.logging.accessLog.computed) config['location = /robots.txt'].access_log = 'off';
|
if (global.logging.accessLogEnabled.computed) config['location = /robots.txt'].access_log = 'off';
|
||||||
|
|
||||||
if (global.performance.disableHtmlCaching.computed) {
|
if (global.performance.disableHtmlCaching.computed) {
|
||||||
// Disable HTML caching for changes take effect in time
|
// Disable HTML caching for changes take effect in time
|
||||||
|
@ -48,7 +48,7 @@ export default (domains, global) => {
|
||||||
config[loc] = {
|
config[loc] = {
|
||||||
add_header: 'Cache-Control "no-cache"',
|
add_header: 'Cache-Control "no-cache"',
|
||||||
};
|
};
|
||||||
if (global.logging.accessLog.computed) config[loc].access_log = 'off';
|
if (global.logging.accessLogEnabled.computed) config[loc].access_log = 'off';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ export default (domains, global) => {
|
||||||
config[loc] = {
|
config[loc] = {
|
||||||
expires: global.performance.assetsExpiration.computed,
|
expires: global.performance.assetsExpiration.computed,
|
||||||
};
|
};
|
||||||
if (global.logging.accessLog.computed) config[loc].access_log = 'off';
|
if (global.logging.accessLogEnabled.computed) config[loc].access_log = 'off';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Assets & media separately
|
// Assets & media separately
|
||||||
|
@ -71,7 +71,7 @@ export default (domains, global) => {
|
||||||
config[loc] = {
|
config[loc] = {
|
||||||
expires: global.performance.assetsExpiration.computed,
|
expires: global.performance.assetsExpiration.computed,
|
||||||
};
|
};
|
||||||
if (global.logging.accessLog.computed) config[loc].access_log = 'off';
|
if (global.logging.accessLogEnabled.computed) config[loc].access_log = 'off';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (global.performance.mediaExpiration.computed) {
|
if (global.performance.mediaExpiration.computed) {
|
||||||
|
@ -80,7 +80,7 @@ export default (domains, global) => {
|
||||||
config[loc] = {
|
config[loc] = {
|
||||||
expires: global.performance.mediaExpiration.computed,
|
expires: global.performance.mediaExpiration.computed,
|
||||||
};
|
};
|
||||||
if (global.logging.accessLog.computed) config[loc].access_log = 'off';
|
if (global.logging.accessLogEnabled.computed) config[loc].access_log = 'off';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ export default (domains, global) => {
|
||||||
add_header: 'Access-Control-Allow-Origin "*"',
|
add_header: 'Access-Control-Allow-Origin "*"',
|
||||||
expires: global.performance.svgExpiration.computed,
|
expires: global.performance.svgExpiration.computed,
|
||||||
};
|
};
|
||||||
if (global.logging.accessLog.computed) config[loc].access_log = 'off';
|
if (global.logging.accessLogEnabled.computed) config[loc].access_log = 'off';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// SVG & fonts separately
|
// SVG & fonts separately
|
||||||
|
@ -104,7 +104,7 @@ export default (domains, global) => {
|
||||||
add_header: 'Access-Control-Allow-Origin "*"',
|
add_header: 'Access-Control-Allow-Origin "*"',
|
||||||
expires: global.performance.svgExpiration.computed,
|
expires: global.performance.svgExpiration.computed,
|
||||||
};
|
};
|
||||||
if (global.logging.accessLog.computed) config[loc].access_log = 'off';
|
if (global.logging.accessLogEnabled.computed) config[loc].access_log = 'off';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (global.performance.fontsExpiration.computed) {
|
if (global.performance.fontsExpiration.computed) {
|
||||||
|
@ -114,7 +114,7 @@ export default (domains, global) => {
|
||||||
add_header: 'Access-Control-Allow-Origin "*"',
|
add_header: 'Access-Control-Allow-Origin "*"',
|
||||||
expires: global.performance.fontsExpiration.computed,
|
expires: global.performance.fontsExpiration.computed,
|
||||||
};
|
};
|
||||||
if (global.logging.accessLog.computed) config[loc].access_log = 'off';
|
if (global.logging.accessLogEnabled.computed) config[loc].access_log = 'off';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ export default (domains, global) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
config.http.push(['# Logging', '']);
|
config.http.push(['# Logging', '']);
|
||||||
if (global.logging.accessLog.computed) {
|
if (global.logging.accessLogEnabled.computed) {
|
||||||
config.http.push(['access_log', global.logging.accessLogPath.computed.trim() +
|
config.http.push(['access_log', global.logging.accessLogPath.computed.trim() +
|
||||||
(global.logging.cloudflare.computed ? ' cloudflare' : '') +
|
(global.logging.cloudflare.computed ? ' cloudflare' : '') +
|
||||||
(global.logging.accessLogParameters.computed ? ` ${global.logging.accessLogParameters.computed.trim()}` : ''),
|
(global.logging.accessLogParameters.computed ? ` ${global.logging.accessLogParameters.computed.trim()}` : ''),
|
||||||
|
@ -115,7 +115,7 @@ export default (domains, global) => {
|
||||||
} else {
|
} else {
|
||||||
config.http.push(['access_log', 'off']);
|
config.http.push(['access_log', 'off']);
|
||||||
}
|
}
|
||||||
if (global.logging.errorLog.computed) {
|
if (global.logging.errorLogEnabled.computed) {
|
||||||
config.http.push(['error_log', global.logging.errorLogPath.computed.trim() +
|
config.http.push(['error_log', global.logging.errorLogPath.computed.trim() +
|
||||||
` ${global.logging.errorLogLevel.computed}`]);
|
` ${global.logging.errorLogLevel.computed}`]);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -221,13 +221,13 @@ export default (domain, domains, global, ipPortPairs) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Access log or error log for domain
|
// Access log or error log for domain
|
||||||
if (domain.logging.accessLog.computed || domain.logging.errorLog.computed) {
|
if (domain.logging.accessLogEnabled.computed || domain.logging.errorLogEnabled.computed) {
|
||||||
serverConfig.push(['# logging', '']);
|
serverConfig.push(['# logging', '']);
|
||||||
|
|
||||||
if (domain.logging.accessLog.computed)
|
if (domain.logging.accessLogEnabled.computed)
|
||||||
serverConfig.push(['access_log', getDomainAccessLog(domain, global)]);
|
serverConfig.push(['access_log', getDomainAccessLog(domain, global)]);
|
||||||
|
|
||||||
if (domain.logging.errorLog.computed)
|
if (domain.logging.errorLogEnabled.computed)
|
||||||
serverConfig.push(['error_log', getDomainErrorLog(domain)]);
|
serverConfig.push(['error_log', getDomainErrorLog(domain)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,14 +32,14 @@ THE SOFTWARE.
|
||||||
</div>
|
</div>
|
||||||
<div class="field-body">
|
<div class="field-body">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div :class="`control${accessLogChanged ? ' is-changed' : ''}`">
|
<div :class="`control${accessLogEnabledChanged ? ' is-changed' : ''}`">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<PrettyCheck v-model="accessLog" class="p-default p-curve p-fill p-icon">
|
<PrettyCheck v-model="accessLogEnabled" class="p-default p-curve p-fill p-icon">
|
||||||
{{ $t('templates.domainSections.logging.enableForThisDomain') }}
|
{{ $t('templates.domainSections.logging.enableForThisDomain') }}
|
||||||
</PrettyCheck>
|
</PrettyCheck>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="$props.data.accessLog.computed" :class="`control field is-horizontal is-expanded${accessLogPathChanged ? ' is-changed' : ''}`">
|
<div v-if="$props.data.accessLogEnabled.computed" :class="`control field is-horizontal is-expanded${accessLogPathChanged ? ' is-changed' : ''}`">
|
||||||
<input
|
<input
|
||||||
v-model="accessLogPath"
|
v-model="accessLogPath"
|
||||||
class="input"
|
class="input"
|
||||||
|
@ -51,7 +51,7 @@ THE SOFTWARE.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="$props.data.accessLog.computed" class="field is-horizontal">
|
<div v-if="$props.data.accessLogEnabled.computed" class="field is-horizontal">
|
||||||
<div class="field-label">
|
<div class="field-label">
|
||||||
<label class="label">access_log {{ $t('templates.domainSections.logging.arguments') }}</label>
|
<label class="label">access_log {{ $t('templates.domainSections.logging.arguments') }}</label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -75,13 +75,13 @@ THE SOFTWARE.
|
||||||
</div>
|
</div>
|
||||||
<div class="field-body">
|
<div class="field-body">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div :class="`control${errorLogChanged ? ' is-changed' : ''}`">
|
<div :class="`control${errorLogEnabledChanged ? ' is-changed' : ''}`">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<PrettyCheck v-model="errorLog" class="p-default p-curve p-fill p-icon">
|
<PrettyCheck v-model="errorLogEnabled" class="p-default p-curve p-fill p-icon">
|
||||||
{{ $t('templates.domainSections.logging.enableForThisDomain') }}
|
{{ $t('templates.domainSections.logging.enableForThisDomain') }}
|
||||||
</PrettyCheck>
|
</PrettyCheck>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="$props.data.errorLog.computed" :class="`control field is-horizontal is-expanded${errorLogPathChanged ? ' is-changed' : ''}`">
|
<div v-if="$props.data.errorLogEnabled.computed" :class="`control field is-horizontal is-expanded${errorLogPathChanged ? ' is-changed' : ''}`">
|
||||||
<input
|
<input
|
||||||
v-model="errorLogPath"
|
v-model="errorLogPath"
|
||||||
class="input"
|
class="input"
|
||||||
|
@ -94,7 +94,7 @@ THE SOFTWARE.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="$props.data.errorLog.computed" class="field is-horizontal">
|
<div v-if="$props.data.errorLogEnabled.computed" class="field is-horizontal">
|
||||||
<div class="field-label">
|
<div class="field-label">
|
||||||
<label class="label">error_log {{ $t('templates.domainSections.logging.level') }}</label>
|
<label class="label">error_log {{ $t('templates.domainSections.logging.level') }}</label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -124,7 +124,7 @@ THE SOFTWARE.
|
||||||
import PrettyRadio from '../inputs/radio';
|
import PrettyRadio from '../inputs/radio';
|
||||||
|
|
||||||
const defaults = {
|
const defaults = {
|
||||||
accessLog: {
|
accessLogEnabled: {
|
||||||
default: true,
|
default: true,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
|
@ -136,7 +136,7 @@ THE SOFTWARE.
|
||||||
default: accessLogParamsDefault,
|
default: accessLogParamsDefault,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
errorLog: {
|
errorLogEnabled: {
|
||||||
default: true,
|
default: true,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
|
|
|
@ -32,14 +32,14 @@ THE SOFTWARE.
|
||||||
</div>
|
</div>
|
||||||
<div class="field-body">
|
<div class="field-body">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div :class="`control${accessLogChanged ? ' is-changed' : ''}`">
|
<div :class="`control${accessLogEnabledChanged ? ' is-changed' : ''}`">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<PrettyCheck v-model="accessLog" class="p-default p-curve p-fill p-icon">
|
<PrettyCheck v-model="accessLogEnabled" class="p-default p-curve p-fill p-icon">
|
||||||
{{ $t('common.enable') }}
|
{{ $t('common.enable') }}
|
||||||
</PrettyCheck>
|
</PrettyCheck>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="$props.data.accessLog.computed" :class="`control field is-horizontal is-expanded${accessLogPathChanged ? ' is-changed' : ''}`">
|
<div v-if="$props.data.accessLogEnabled.computed" :class="`control field is-horizontal is-expanded${accessLogPathChanged ? ' is-changed' : ''}`">
|
||||||
<input
|
<input
|
||||||
v-model="accessLogPath"
|
v-model="accessLogPath"
|
||||||
class="input"
|
class="input"
|
||||||
|
@ -51,7 +51,7 @@ THE SOFTWARE.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="$props.data.accessLog.computed" class="field is-horizontal">
|
<div v-if="$props.data.accessLogEnabled.computed" class="field is-horizontal">
|
||||||
<div class="field-label">
|
<div class="field-label">
|
||||||
<label class="label">access_log {{ $t('templates.globalSections.logging.arguments') }}</label>
|
<label class="label">access_log {{ $t('templates.globalSections.logging.arguments') }}</label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -75,14 +75,14 @@ THE SOFTWARE.
|
||||||
</div>
|
</div>
|
||||||
<div class="field-body">
|
<div class="field-body">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div :class="`control${errorLogChanged ? ' is-changed' : ''}`">
|
<div :class="`control${errorLogEnabledChanged ? ' is-changed' : ''}`">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<PrettyCheck v-model="errorLog" class="p-default p-curve p-fill p-icon">
|
<PrettyCheck v-model="errorLogEnabled" class="p-default p-curve p-fill p-icon">
|
||||||
{{ $t('common.enable') }}
|
{{ $t('common.enable') }}
|
||||||
</PrettyCheck>
|
</PrettyCheck>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="$props.data.errorLog.computed" :class="`control field is-horizontal is-expanded${errorLogPathChanged ? ' is-changed' : ''}`">
|
<div v-if="$props.data.errorLogEnabled.computed" :class="`control field is-horizontal is-expanded${errorLogPathChanged ? ' is-changed' : ''}`">
|
||||||
<input
|
<input
|
||||||
v-model="errorLogPath"
|
v-model="errorLogPath"
|
||||||
class="input"
|
class="input"
|
||||||
|
@ -94,7 +94,7 @@ THE SOFTWARE.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="$props.data.errorLog.computed" class="field is-horizontal">
|
<div v-if="$props.data.errorLogEnabled.computed" class="field is-horizontal">
|
||||||
<div class="field-label">
|
<div class="field-label">
|
||||||
<label class="label">error_log {{ $t('templates.globalSections.logging.level') }}</label>
|
<label class="label">error_log {{ $t('templates.globalSections.logging.level') }}</label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -214,7 +214,7 @@ THE SOFTWARE.
|
||||||
import PrettyRadio from '../inputs/radio';
|
import PrettyRadio from '../inputs/radio';
|
||||||
|
|
||||||
const defaults = {
|
const defaults = {
|
||||||
accessLog: {
|
accessLogEnabled: {
|
||||||
default: false,
|
default: false,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
|
@ -226,7 +226,7 @@ THE SOFTWARE.
|
||||||
default: accessLogParamsDefault,
|
default: accessLogParamsDefault,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
errorLog: {
|
errorLogEnabled: {
|
||||||
default: false,
|
default: false,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue