bypass proxy for secure requests

This commit is contained in:
Stewart Allen 2026-03-01 22:37:23 -05:00
commit 53c1466246

View file

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