mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Fix Deepsource warning message for index.php file
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
parent
1b0b0ca445
commit
d48c557134
1 changed files with 4 additions and 3 deletions
|
@ -29,7 +29,8 @@ if (!empty($_SERVER["FQDN"])) {
|
||||||
if ($serverName === "pi.hole"
|
if ($serverName === "pi.hole"
|
||||||
|| (!empty($_SERVER["VIRTUAL_HOST"]) && $serverName === $_SERVER["VIRTUAL_HOST"])) {
|
|| (!empty($_SERVER["VIRTUAL_HOST"]) && $serverName === $_SERVER["VIRTUAL_HOST"])) {
|
||||||
// Redirect to Web Interface
|
// Redirect to Web Interface
|
||||||
exit(header("Location: /admin"));
|
header("Location: /admin");
|
||||||
|
exit();
|
||||||
} elseif (filter_var($serverName, FILTER_VALIDATE_IP) || in_array($serverName, $authorizedHosts)) {
|
} elseif (filter_var($serverName, FILTER_VALIDATE_IP) || in_array($serverName, $authorizedHosts)) {
|
||||||
// When directly browsing via IP or authorized hostname
|
// When directly browsing via IP or authorized hostname
|
||||||
// Render splash/landing page based off presence of $landPage file
|
// Render splash/landing page based off presence of $landPage file
|
||||||
|
@ -75,6 +76,6 @@ EOT;
|
||||||
exit($splashPage);
|
exit($splashPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(header("HTTP/1.1 404 Not Found"));
|
header("HTTP/1.1 404 Not Found");
|
||||||
|
exit();
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue