Fix login problems

This commit is contained in:
Marcel van Remmerden 2022-02-14 04:49:57 +01:00
parent 15194f8f64
commit 71a3a41a90
No known key found for this signature in database
GPG Key ID: 3AD81256454B7FFB
1 changed files with 5 additions and 1 deletions

View File

@ -54,8 +54,12 @@ module.exports = {
if (store.custom_cert_path) {
params.custom_cert_path = store.custom_cert_path;
}
} else {
params = {
...options,
};
}
const agent = params.customCertPath ? getHttpAgent(params.custom_cert_path) : undefined;
const agent = params.custom_cert_path ? getHttpAgent(params.custom_cert_path) : undefined;
return fetch(`${host}/api/v4/${what}?${serializeAndEscapeOptions(params)}`, {
agent,
}).then((res) => res.json());