mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Initial work towards REST-ful code rework
This commit is contained in:
parent
299ad0b5e2
commit
36b34389ac
7 changed files with 28 additions and 15 deletions
|
|
@ -1534,6 +1534,18 @@ end
|
|||
|
||||
-- #################################################################
|
||||
|
||||
local function parsePOSTpayload()
|
||||
if((_POST ~= nil) and (_POST["payload"] ~= nil)) then
|
||||
local info, pos, err = json.decode(_POST["payload"], 1, nil)
|
||||
|
||||
for k,v in pairs(info) do
|
||||
_GET[k] = v
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- #################################################################
|
||||
|
||||
local function clearNotAllowedParams()
|
||||
if ntop.isnEdge() then
|
||||
-- Captive portal urls that can be clobbered with unrecognized
|
||||
|
|
@ -1568,6 +1580,7 @@ end
|
|||
-- #################################################################
|
||||
|
||||
if(pragma_once) then
|
||||
parsePOSTpayload()
|
||||
clearNotAllowedParams()
|
||||
lintParams()
|
||||
pragma_once = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue