Berry make LVGL Panel and Led Panel compatible with VPN (#24016)

This commit is contained in:
s-hadinger 2025-10-15 17:03:39 +02:00 committed by GitHub
parent 2660ad72ab
commit 0c625b0860
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 2 deletions

View File

@ -1035,8 +1035,12 @@ class lvgl_panel
def send_iframe_code()
import webserver
import string
self.update()
var ip = tasmota.wifi().find('ip')
var ip = string.split(webserver.header('Host'), ':')[0] # get 'Host' header and take everything before the first ':'
if (ip == nil || ip == '')
ip = tasmota.wifi().find('ip')
end
if (ip == nil)
ip = tasmota.eth().find('ip')
end

View File

@ -966,8 +966,12 @@ class leds_panel
def send_iframe_code()
import webserver
import string
self.update()
var ip = tasmota.wifi().find('ip')
var ip = string.split(webserver.header('Host'), ':')[0] # get 'Host' header and take everything before the first ':'
if (ip == nil || ip == '')
ip = tasmota.wifi().find('ip')
end
if (ip == nil)
ip = tasmota.eth().find('ip')
end