Browse Source

Added auth to pihole homepage item

Previously, the function would always respond, regardless of minimum auth setting
Henry Whitaker 6 năm trước cách đây
mục cha
commit
57a43a7e42
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      api/functions/homepage-connect-functions.php

+ 1 - 1
api/functions/homepage-connect-functions.php

@@ -123,7 +123,7 @@ function getHealthChecks($tags = null)
 
 function getPihole()
 {
-	if ($GLOBALS['homepagePiholeEnabled'] && !empty($GLOBALS['piholeURL'])) {
+	if ($GLOBALS['homepagePiholeEnabled'] && !empty($GLOBALS['piholeURL']) && qualifyRequest($GLOBALS['homepagePiholeAuth'])) {
 		$api = array();
 		$urls = explode(',', $GLOBALS['piholeURL']);
 		foreach ($urls as $url) {