Skip to content

Commit dae1629

Browse files
authored
Make LVGL Panel and Led Panel compatible with VPN
1 parent 3b1483d commit dae1629

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

raw/LVGL_Panel/lvgl_panel.be

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,8 +1035,12 @@ class lvgl_panel
10351035

10361036
def send_iframe_code()
10371037
import webserver
1038+
import string
10381039
self.update()
1039-
var ip = tasmota.wifi().find('ip')
1040+
var ip = string.split(webserver.header('Host'), ':')[0] # get 'Host' header and take everything before the first ':'
1041+
if (ip == nil || ip == '')
1042+
ip = tasmota.wifi().find('ip')
1043+
end
10401044
if (ip == nil)
10411045
ip = tasmota.eth().find('ip')
10421046
end

raw/Leds_Panel/leds_panel.be

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,8 +966,12 @@ class leds_panel
966966

967967
def send_iframe_code()
968968
import webserver
969+
import string
969970
self.update()
970-
var ip = tasmota.wifi().find('ip')
971+
var ip = string.split(webserver.header('Host'), ':')[0] # get 'Host' header and take everything before the first ':'
972+
if (ip == nil || ip == '')
973+
ip = tasmota.wifi().find('ip')
974+
end
971975
if (ip == nil)
972976
ip = tasmota.eth().find('ip')
973977
end

0 commit comments

Comments
 (0)