增加https关键字

This commit is contained in:
吴永福
2025-03-20 10:21:32 +08:00
parent 56395f62bc
commit 7ea87ae4c9
2 changed files with 9 additions and 3 deletions

View File

@@ -563,7 +563,7 @@ const struct httpd_wsgi_call g_app_handlers[] = {
{"/mqtt/report/freq", HTTPD_HDR_DEFORT, 0, HttpGetMqttReportFreq, HttpSetMqttReportFreq, NULL, NULL},
{"/log", HTTPD_HDR_DEFORT, 0, HttpGetLog, NULL, NULL, NULL},
{"/task", HTTPD_HDR_DEFORT, APP_HTTP_FLAGS_NO_EXACT_MATCH, HttpGetTasks, HttpAddTask, NULL, HttpDelTask},
{"/ota", HTTPD_HDR_DEFORT, 0, Otastatus, OtaStart, NULL, NULL},
{"https://ota", HTTPD_HDR_DEFORT, 0, Otastatus, OtaStart, NULL, NULL},
{"/led", HTTPD_HDR_DEFORT, 0, LedStatus, LedSetEnabled, NULL, NULL},
{"/socketAll", HTTPD_HDR_DEFORT, 0, NULL, TotalSocketSetEnabled, NULL, NULL},
{"/socketNames", HTTPD_HDR_DEFORT, 0, NULL, HttpSetSocketName, NULL, NULL},

View File

@@ -1200,7 +1200,10 @@
//OTA-start
function OtaStart() {
var ota_url = document.getElementById("ota_url").value;
HttpPost("/ota", function (re) {
var protocol = window.location.protocol;
var baseUrl = protocol+"//"+window.location.host;
HttpPost("https://ota", function (re) {
OtaStatus();
}, ota_url);
}
@@ -1209,7 +1212,10 @@
this.MaterialProgress.setProgress(0);
});
function OtaStatus() {
HttpGet("/ota", function (re) {
var protocol = window.location.protocol;
var baseUrl = protocol+"//"+window.location.host;
HttpGet("https://ota", function (re) {
var percent = parseInt(re);
//console.log(re + " " + parseInt(re));
ota_status.MaterialProgress.setProgress(percent);