diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index f86faf6..1f3651f 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -16,7 +16,7 @@ services: network_mode: service:pihole user: node pihole: - image: pihole/pihole + image: pihole/pihole:2022.12 environment: WEBPASSWORD: pihole restart: unless-stopped diff --git a/server/index.ts b/server/index.ts index fdc9bb4..f9f4d69 100644 --- a/server/index.ts +++ b/server/index.ts @@ -80,6 +80,9 @@ function get(url: URL, callback: (data: string) => void, error?: (error?: Error) function status(callback: (status: any) => void) { let url = new URL(`${pihole}/admin/api.php`) + url.searchParams.append('auth', apiKey) + url.searchParams.append('summary', '') + console.log(`GET ${url.toString()}`) get(url, data => { let dataObj = JSON.parse(data) if (dataObj.status === 'disabled') {