ソースを参照

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) {