fixed custom header authentication

This commit is contained in:
zadam
2021-02-07 21:50:34 +01:00
parent bed7bdfd00
commit be65e2e62f
5 changed files with 19 additions and 22 deletions

View File

@@ -70,9 +70,9 @@ async function setupSyncFromSyncServer(syncServerHost, syncProxy, username, pass
const resp = await request.exec({
method: 'get',
url: syncServerHost + '/api/setup/sync-seed',
headers: {
// not using Authorization header because some proxy servers will filter it out
'trilium-cred': Buffer.from(username + ':' + password).toString('base64')
auth: {
username,
password
},
proxy: syncProxy,
timeout: 30000 // seed request should not take long