mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
21 lines
377 B
Lua
21 lines
377 B
Lua
--
|
|
-- (C) 2017-20 - ntop.org
|
|
--
|
|
|
|
local dirs = ntop.getDirs()
|
|
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
|
|
|
require "lua_utils"
|
|
local json = require("dkjson")
|
|
|
|
sendHTTPHeader('application/json')
|
|
|
|
if not haveAdminPrivileges() then
|
|
return
|
|
end
|
|
|
|
ntop.serviceRestart()
|
|
|
|
res = { csrf = ntop.getRandomCSRFValue() }
|
|
|
|
print(json.encode(res, nil, 1))
|