diff --git a/server-ce/nginx/sharelatex.conf b/server-ce/nginx/sharelatex.conf index 0111797967..cf63f4c5c4 100644 --- a/server-ce/nginx/sharelatex.conf +++ b/server-ce/nginx/sharelatex.conf @@ -10,7 +10,6 @@ server { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_read_timeout 3m; proxy_send_timeout 3m; diff --git a/server-ce/settings.coffee b/server-ce/settings.coffee index 77e4085642..f1e32e87bc 100644 --- a/server-ce/settings.coffee +++ b/server-ce/settings.coffee @@ -148,6 +148,11 @@ settings = behindProxy: process.env["SHARELATEX_BEHIND_PROXY"] or false + i18n: + subdomainLang: + www: {lngCode:process.env["SHARELATEX_SITE_LANGUAGE"] or "en", url: siteUrl} + defaultLng: process.env["SHARELATEX_SITE_LANGUAGE"] or "en" + # Spell Check Languages # --------------------- # @@ -340,9 +345,6 @@ if process.env["SHARELATEX_HEADER_EXTRAS"]? console.error("could not parse SHARELATEX_HEADER_EXTRAS, not valid JSON") -# if process.env["SHARELATEX_PROXY_LEARN"]? -# settings.nav.header.push({text: "help", class: "subdued", dropdown: [{text: "documentation", url: "/learn"}] }) - # Sending Email # ------------- @@ -382,7 +384,12 @@ if process.env["SHARELATEX_EMAIL_FROM_ADDRESS"]? if process.env["SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH"]? settings.email.parameters.tls = rejectUnauthorized: parse(process.env["SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH"]) - + + +# i18n +if process.env["SHARELATEX_LANG_DOMAIN_MAPPING"]? + + settings.i18n.subdomainLang = parse(process.env["SHARELATEX_LANG_DOMAIN_MAPPING"]) # Password Settings # ----------- @@ -392,7 +399,7 @@ if process.env["SHARELATEX_PASSWORD_VALIDATION_PATTERN"] or process.env["SHARELA settings.passwordStrengthOptions = pattern: process.env["SHARELATEX_PASSWORD_VALIDATION_PATTERN"] or "aA$3" - length: {min:process.env["SHARELATEX_PASSWORD_VALIDATION_MIN_LENGTH"] or 8, max: process.env["SHARELATEX_PASSWORD_VALIDATION_MAX_LENGTH"] or 50} + length: {min:process.env["SHARELATEX_PASSWORD_VALIDATION_MIN_LENGTH"] or 8, max: process.env["SHARELATEX_PASSWORD_VALIDATION_MAX_LENGTH"] or 150}