mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Use POST requests when required
This commit is contained in:
parent
910fdcdc4a
commit
397d525d85
25 changed files with 282 additions and 451 deletions
|
|
@ -8,11 +8,10 @@ require "lua_utils"
|
|||
|
||||
sendHTTPHeader('application/json')
|
||||
|
||||
if(_GET["csrf"] ~= nil) then
|
||||
username = _GET["username"]
|
||||
host_role = _GET["host_role"]
|
||||
networks = _GET["networks"]
|
||||
allowed_interface = _GET["allowed_interface"]
|
||||
username = _POST["username"]
|
||||
host_role = _POST["host_role"]
|
||||
networks = _POST["networks"]
|
||||
allowed_interface = _POST["allowed_interface"]
|
||||
|
||||
if(username == nil) then
|
||||
print ("{ \"result\" : -1, \"message\" : \"Error in username\" }")
|
||||
|
|
@ -41,4 +40,3 @@ if(allowed_interface ~= nil) then
|
|||
end
|
||||
|
||||
print ("{ \"result\" : 0, \"message\" : \"Parameters Updated\" }")
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue