mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Fix resolve hostname
This commit is contained in:
parent
be833efbd1
commit
6fa18515d0
1 changed files with 7 additions and 0 deletions
|
|
@ -33,6 +33,13 @@ if string.find(hostname, '://') then
|
|||
end
|
||||
end
|
||||
|
||||
if string.find(hostname, '/') then
|
||||
-- Looks like an URI, strip the scheme
|
||||
local uri_info = string.split(hostname, "/")
|
||||
hostname = uri_info[1]
|
||||
|
||||
end
|
||||
|
||||
if string.find(hostname, ':') then
|
||||
local host_port_info = string.split(hostname, ":")
|
||||
if #host_port_info == 2 then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue