🔀 Rebased from master
This commit is contained in:
@@ -14,8 +14,7 @@ export default {
|
||||
credentials() {
|
||||
if (this.options.username && this.options.password) {
|
||||
const stringifiedUser = `${this.options.username}:${this.options.password}`;
|
||||
const headers = { Authorization: `Basic ${window.btoa(stringifiedUser)}` };
|
||||
return { headers };
|
||||
return { Authorization: `Basic ${window.btoa(stringifiedUser)}` };
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
@@ -106,8 +106,9 @@ const WidgetMixin = {
|
||||
const CustomHeaders = options || null;
|
||||
const headers = this.useProxy
|
||||
? { 'Target-URL': endpoint, CustomHeaders: JSON.stringify(CustomHeaders) } : CustomHeaders;
|
||||
const timeout = this.options.timeout || 500;
|
||||
const requestConfig = {
|
||||
method, url, headers, data,
|
||||
method, url, headers, data, timeout,
|
||||
};
|
||||
// Make request
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
Reference in New Issue
Block a user