File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments