summaryrefslogtreecommitdiff
path: root/lib/config
diff options
context:
space:
mode:
Diffstat (limited to 'lib/config')
-rw-r--r--lib/config/index.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/config/index.js b/lib/config/index.js
index 1657ba7a..17c13f5f 100644
--- a/lib/config/index.js
+++ b/lib/config/index.js
@@ -58,14 +58,14 @@ if (!['strict', 'lax', 'none'].includes(config.cookiePolicy)) {
// load LDAP CA
if (config.ldap.tlsca) {
- let ca = config.ldap.tlsca.split(',')
- let caContent = []
- for (let i of ca) {
+ const ca = config.ldap.tlsca.split(',')
+ const caContent = []
+ for (const i of ca) {
if (fs.existsSync(i)) {
caContent.push(fs.readFileSync(i, 'utf8'))
}
}
- let tlsOptions = {
+ const tlsOptions = {
ca: caContent
}
config.ldap.tlsOptions = config.ldap.tlsOptions ? Object.assign(config.ldap.tlsOptions, tlsOptions) : tlsOptions
@@ -90,9 +90,9 @@ config.isStandardHTTPPort = (function isStandardHTTPPort () {
// cache serverURL
config.serverURL = (function getserverurl () {
- var url = ''
+ let url = ''
if (config.domain) {
- var protocol = config.protocolUseSSL ? 'https://' : 'http://'
+ const protocol = config.protocolUseSSL ? 'https://' : 'http://'
url = protocol + config.domain
if (config.urlAddPort) {
if (!config.isStandardHTTPPort || !config.isStandardHTTPsPort) {
@@ -138,10 +138,10 @@ config.isGitlabSnippetsEnable = (!config.gitlab.scope || config.gitlab.scope ===
config.updateI18nFiles = (env === Environment.development)
// merge legacy values
-let keys = Object.keys(config)
+const keys = Object.keys(config)
const uppercase = /[A-Z]/
for (let i = keys.length; i--;) {
- let lowercaseKey = keys[i].toLowerCase()
+ const lowercaseKey = keys[i].toLowerCase()
// if the config contains uppercase letters
// and a lowercase version of this setting exists
// and the config with uppercase is not set