Made /wol a POST request instead of a GET

Since it does modify state.

* Also fixed a bug where ping did sometimes still write to the
response.
This commit is contained in:
2022-03-10 23:33:05 +00:00
parent d47683dc02
commit 3f6c392969
6 changed files with 60 additions and 21 deletions

View File

@@ -69,8 +69,11 @@ var request_wol = function (host) {
}
});
request.open("GET", "wol/" + host.mac);
request.send();
var params = "mac=" + host.mac;
request.open("POST", "wol", true);
request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
request.send(params);
setTimeout(function () {
request_refresh(host);