From acbef91e9c3855ae4459b4726c6eaa07f2a8e94e Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 5 Dec 2016 11:04:00 +0100 Subject: [PATCH] Make sure that js/pihole/queryads.js always finds its target + remove requirement for authorization on php/queryads.php for using it within the new blocking page --- js/pihole/queryads.js | 3 ++- php/queryads.php | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/js/pihole/queryads.js b/js/pihole/queryads.js index 26061d42..364534c6 100644 --- a/js/pihole/queryads.js +++ b/js/pihole/queryads.js @@ -5,7 +5,8 @@ function eventsource() { { return; } - var source = new EventSource("php/queryads.php?domain="+domain.val()); + var host = window.location.host; + var source = new EventSource("http://"+host+"/admin/php/queryads.php?domain="+domain.val()); // Reset and show field ta.empty(); diff --git a/php/queryads.php b/php/queryads.php index e77ee223..eedb4a22 100644 --- a/php/queryads.php +++ b/php/queryads.php @@ -1,7 +1,4 @@