take 2 on proxy

This commit is contained in:
Stewart Allen 2026-03-01 23:07:53 -05:00
commit 6d2182d2d4

View file

@ -248,14 +248,15 @@ function exportGCodeDialog(gcode, sections, info, names) {
host = octo_host.value.toLowerCase(), host = octo_host.value.toLowerCase(),
apik = octo_apik.value, apik = octo_apik.value,
type = octo_type.value, type = octo_type.value,
secure = api.util.isSecure(host), targetLocal = !api.util.isSecure(host),
proxy = !secure && api.feature.proxy ? host : undefined; siteSecure = api.const.SECURE,
proxy = targetLocal && api.feature.proxy ? host : undefined;
if (host.indexOf("http") !== 0) { if (host.indexOf("http") !== 0) {
api.show.alert("host missing protocol (http:// or https://)"); api.show.alert("host missing protocol (http:// or https://)");
return; return;
} }
if (api.const.SECURE && !secure && !proxy) { if (siteSecure && targetLocal && !proxy) {
api.show.alert("host must begin with 'https' on a secure site"); api.show.alert("host must begin with 'https' on a secure site");
return; return;
} }