fix proxy secure logic
This commit is contained in:
parent
53c1466246
commit
d46ed6f587
1 changed files with 2 additions and 2 deletions
|
|
@ -248,14 +248,14 @@ 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.const.SECURE,
|
secure = api.util.isSecure(host),
|
||||||
proxy = !secure && api.feature.proxy ? host : undefined;
|
proxy = !secure && 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 (secure && !api.util.isSecure(host) && !proxy) {
|
if (api.const.SECURE && !secure && !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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue