This commit is contained in:
Mirco Wittrien 2022-01-11 18:13:34 +01:00
parent 9ddd01060d
commit 238a130333
5 changed files with 8 additions and 8 deletions

View File

@ -945,7 +945,7 @@ module.exports = (_ => {
BDFDB.ReactUtils.forceUpdate(instance);
}
else instance.checkTimeout = BDFDB.TimeUtils.timeout(_ => {
BDFDB.LibraryRequires.request(url, (error, response, result) => {
BDFDB.LibraryRequires.request(url, {agentOptions: {rejectUnauthorized: false}}, (error, response, result) => {
delete instance.checkTimeout;
if (instance.props.disabled) {
delete instance.props.success;

View File

@ -413,7 +413,7 @@ module.exports = (_ => {
BDFDB.ReactUtils.forceUpdate(instance);
}
else instance.checkTimeout = BDFDB.TimeUtils.timeout(_ => {
BDFDB.LibraryRequires.request(url, (error, response, result) => {
BDFDB.LibraryRequires.request(url, {agentOptions: {rejectUnauthorized: false}}, (error, response, result) => {
delete instance.checkTimeout;
if (instance.props.disabled) {
delete instance.props.success;

View File

@ -680,7 +680,7 @@ module.exports = (_ => {
BDFDB.ReactUtils.forceUpdate(instance);
}
else instance.checkTimeout = BDFDB.TimeUtils.timeout(_ => {
BDFDB.LibraryRequires.request(url, (error, response, result) => {
BDFDB.LibraryRequires.request(url, {agentOptions: {rejectUnauthorized: false}}, (error, response, result) => {
delete instance.checkTimeout;
if (instance.props.disabled) {
delete instance.props.success;

View File

@ -1748,7 +1748,7 @@ module.exports = (_ => {
BDFDB.ReactUtils.forceUpdate(instance);
}
else instance.checkTimeout = BDFDB.TimeUtils.timeout(_ => {
BDFDB.LibraryRequires.request(url, (error, response, result) => {
BDFDB.LibraryRequires.request(url, {agentOptions: {rejectUnauthorized: false}}, (error, response, result) => {
delete instance.checkTimeout;
if (instance.props.disabled) {
delete instance.props.success;

View File

@ -1026,7 +1026,7 @@ module.exports = (_ => {
downloadFile (url, path, fallbackUrl, alternativeName) {
url = url.startsWith("/assets") ? (window.location.origin + url) : url;
BDFDB.LibraryRequires.request(url, {encoding: null}, (error, response, body) => {
BDFDB.LibraryRequires.request(url, {agentOptions: {rejectUnauthorized: false}, encoding: null}, (error, response, body) => {
let type = this.isValid(url, "video") ? BDFDB.LanguageUtils.LanguageStrings.VIDEO : BDFDB.LanguageUtils.LanguageStrings.IMAGE;
if (error || response.statusCode != 200) {
if (fallbackUrl) this.downloadFile(fallbackUrl, path, null, alternativeName);
@ -1043,7 +1043,7 @@ module.exports = (_ => {
downloadFileAs (url, fallbackUrl, alternativeName) {
url = url.startsWith("/assets") ? (window.location.origin + url) : url;
BDFDB.LibraryRequires.request(url, {encoding: null}, (error, response, body) => {
BDFDB.LibraryRequires.request(url, {agentOptions: {rejectUnauthorized: false}, encoding: null}, (error, response, body) => {
let type = this.isValid(url, "video") ? BDFDB.LanguageUtils.LanguageStrings.VIDEO : BDFDB.LanguageUtils.LanguageStrings.IMAGE;
if (error || response.statusCode != 200) {
if (fallbackUrl) this.downloadFileAs(fallbackUrl, null, alternativeName);
@ -1061,7 +1061,7 @@ module.exports = (_ => {
}
copyFile (url) {
BDFDB.LibraryRequires.request(url, {encoding: null}, (error, response, body) => {
BDFDB.LibraryRequires.request(url, {agentOptions: {rejectUnauthorized: false}, encoding: null}, (error, response, body) => {
let type = this.isValid(url, "video") ? BDFDB.LanguageUtils.LanguageStrings.VIDEO : BDFDB.LanguageUtils.LanguageStrings.IMAGE;
if (error) BDFDB.NotificationUtils.toast(this.labels.toast_copy_failed.replace("{{var0}}", type), {type: "danger"});
else if (body) {
@ -1583,4 +1583,4 @@ module.exports = (_ => {
}
};
})(window.BDFDB_Global.PluginUtils.buildPlugin(config));
})();
})();