mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-02 16:22:20 -07:00
@@ -308,6 +308,7 @@
|
||||
|
||||
const apiToken = getSetting("API_TOKEN"); // dynamic token
|
||||
const host = window.location.hostname;
|
||||
const protocol = window.location.protocol;
|
||||
const port = getSetting("GRAPHQL_PORT");
|
||||
|
||||
mac = $('#NEWDEV_devMac').val();
|
||||
@@ -356,7 +357,7 @@
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "http://" + host + ":" + port + "/device/" + encodeURIComponent(mac),
|
||||
url: `${protocol}//${host}:${port}/device/${encodeURIComponent(mac)}`,
|
||||
type: "POST",
|
||||
headers: {
|
||||
"Authorization": "Bearer " + apiToken,
|
||||
|
||||
Reference in New Issue
Block a user