mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 00:40:10 +00:00
Fixing redirection issue after changing interface (#4022)
Simplifies interface switch send redirect code Addresses https://github.com/ntop/ntopng/pull/4022
This commit is contained in:
parent
80e5400c36
commit
87d77d12d6
3 changed files with 11 additions and 5 deletions
|
|
@ -779,8 +779,13 @@ for round = 1, 2 do
|
|||
print("<a class=\"dropdown-item active\" href=\"#\">")
|
||||
else
|
||||
-- NOTE: the actual interface switching is performed in C in LuaEngine::handle_script_request
|
||||
local action_url = ntop.getHttpPrefix() .. '/' ..url_query
|
||||
|
||||
local action_url = ""
|
||||
if(is_system_interface) then
|
||||
action_url = ntop.getHttpPrefix() .. '/' .. url_query
|
||||
else
|
||||
action_url = url_query
|
||||
end
|
||||
|
||||
print[[<form id="switch_interface_form_]] print(tostring(k)) print([[" method="post" action="]].. action_url ..[[]]) print[[">]]
|
||||
print[[<input name="switch_interface" type="hidden" value="1" />]]
|
||||
print[[<input name="csrf" type="hidden" value="]] print(ntop.getRandomCSRFValue()) print[[" />]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue