mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Disabled some debug messages in tracings
Added ability to avoid parsing JSON payload when specifying ignore_post_payload_parse = something. This is useful in case of a HTTP post where you do not want to parse it.
Example:
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
local json = require "dkjson"
-- Use ignore_post_payload_parse BEFORE calling 'require "lua_utils"'
ignore_post_payload_parse = 1
require "lua_utils"
sendHTTPContentTypeHeader('application/json')
local info, pos, err = json.decode(_POST["payload"], 1, nil)
This commit is contained in:
parent
500964c457
commit
937ee52de7
3 changed files with 7 additions and 2 deletions
|
|
@ -1581,7 +1581,10 @@ end
|
|||
-- #################################################################
|
||||
|
||||
if(pragma_once) then
|
||||
parsePOSTpayload()
|
||||
if(ignore_post_payload_parse == nil) then
|
||||
parsePOSTpayload()
|
||||
end
|
||||
|
||||
clearNotAllowedParams()
|
||||
lintParams()
|
||||
pragma_once = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue