From c500b5ba713f48f16d3d68afabef7c646f7137c2 Mon Sep 17 00:00:00 2001 From: xian18 <44394537+xian18@users.noreply.github.com> Date: Fri, 11 Feb 2022 16:44:48 +0800 Subject: [PATCH] #publish http not support https --- js/plugins/SF_AutoUpdate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/plugins/SF_AutoUpdate.js b/js/plugins/SF_AutoUpdate.js index 028cac4..57087dd 100644 --- a/js/plugins/SF_AutoUpdate.js +++ b/js/plugins/SF_AutoUpdate.js @@ -122,7 +122,7 @@ var SF_Plugins = SF_Plugins || {}; var path = require('path'); var os = require('os'); var crypto = require('crypto'); - var http = require('http'); + var https = require('https'); SF_AutoUpdate.FileUtils.evaluateJavascript = function (script) { (new Function(script)).call(window); @@ -274,7 +274,7 @@ var SF_Plugins = SF_Plugins || {}; SF_AutoUpdate.UpdateUtils.downloadFullUrl = function (fileName, url, success, fail) { var file = fs.createWriteStream(fileName); - http.get(url, function (response) { + https.get(url, function (response) { response.pipe(file); file.on('finish', function () { file.close(SF_AutoUpdate.UpdateUtils.evaluateJavascript.bind(SF_AutoUpdate.UpdateUtils, success));