Revert "Remove settings.apis.v1 defaults (#2332)" (#2364)

This reverts commit 2763f0afbe153b59ec9b238d7a4f0495677e86ad.

GitOrigin-RevId: 2c741281f268d10d66e0d4613a087919ca462125
This commit is contained in:
Miguel Serrano 2019-11-14 17:22:08 +01:00 committed by sharelatex
parent c7d1f9fb76
commit 8a0b28e7c4

View file

@ -15,16 +15,10 @@ httpAuthUsers[httpAuthUser] = httpAuthPass
sessionSecret = process.env['SESSION_SECRET'] or "secret-please-change"
if process.env['V1_API_URL'] or process.env['V1_HOST']
v1Api =
url: process.env['V1_API_URL'] or "http://#{process.env['V1_HOST']}:5000"
user: process.env['V1_API_USER']
pass: process.env['V1_API_PASSWORD']
else
v1Api =
url: undefined
user: undefined
pass: undefined
v1Api =
url: process.env['V1_API_URL'] or "http://#{process.env['V1_HOST'] or 'localhost'}:5000"
user: process.env['V1_API_USER'] or 'overleaf'
pass: process.env['V1_API_PASSWORD'] or 'password'
module.exports = settings =
@ -165,7 +159,10 @@ module.exports = settings =
url: process.env['LINKED_URL_PROXY']
thirdpartyreferences:
url: "http://#{process.env['THIRD_PARTY_REFERENCES_HOST'] or 'localhost'}:3046"
v1: v1Api
v1:
url: v1Api.url
user: v1Api.user
pass: v1Api.pass
v1_history:
url: "http://#{process.env['V1_HISTORY_HOST'] or "localhost"}:3100/api"
user: process.env['V1_HISTORY_USER'] or 'staging'