Use POST requests when required

This commit is contained in:
emanuele-f 2017-01-14 20:24:24 +01:00
parent 910fdcdc4a
commit 397d525d85
25 changed files with 282 additions and 451 deletions

View file

@ -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