summaryrefslogtreecommitdiff
path: root/lib/config
diff options
context:
space:
mode:
authorDavid Mehren2021-02-16 20:15:15 +0100
committerGitHub2021-02-16 20:15:15 +0100
commit59819be34c2428450528362a5bbb74b6424d15d2 (patch)
treead80595f5dd94a7ac63bc1481943ae7b356ddb17 /lib/config
parent6b8fa94402539168a5bd574ddcc17eeae4910bd0 (diff)
parent136d895d155f28c2e75b3af206549acaa2a354ed (diff)
Merge pull request #872 from hedgedoc/renovate/master-major-linters
Diffstat (limited to '')
-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