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

@@ -38,9 +38,7 @@ function exec(opts) {
};
if (opts.auth) {
const token = Buffer.from(opts.auth.user + ":" + opts.auth.pass).toString('base64');
headers['Authorization'] = `Basic ${token}`;
headers['trilium-cred'] = Buffer.from(opts.auth.username + ":" + opts.auth.password).toString('base64');
}
const request = client.request({