瀏覽代碼

Added auth to pihole homepage item

Previously, the function would always respond, regardless of minimum auth setting
Henry Whitaker 6 年之前
父節點
當前提交
57a43a7e42
共有 1 個文件被更改,包括 1 次插入 和 1 次删除
  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) {