1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00

Merge pull request #8369 from WWBN/wwbnindex_update

Update for WWBNIndex Plugin
This commit is contained in:
Daniel Neto 2023-08-29 15:58:39 -03:00 committed by GitHub
commit 802387e4f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -18,7 +18,7 @@ $platformID = getPlatformId();
$r = $_POST;
if ($wwbnIndex->check_site_availability($_SERVER['HTTP_HOST']) != 200) {
if (empty($_SERVER['SERVER_NAME']) || $_SERVER['SERVER_NAME'] === 'localhost' || filter_var($_SERVER['SERVER_NAME'], FILTER_VALIDATE_IP) || $wwbnIndex->check_site_availability($_SERVER['HTTP_HOST']) != 200) {
echo json_encode(array("error" => true, "title" => "Site not accessible", "message" => "Please make sure your site is viewable in public.")); die();
}

View file

@ -10,7 +10,7 @@ $wwbnIndex = new WWBNIndex();
// return false;
// }
if ($wwbnIndex->check_site_availability($_SERVER['HTTP_HOST']) == 200) {
if (!empty($_SERVER['SERVER_NAME']) && $_SERVER['SERVER_NAME'] !== 'localhost' && !filter_var($_SERVER['SERVER_NAME'], FILTER_VALIDATE_IP) && $wwbnIndex->check_site_availability($_SERVER['HTTP_HOST']) == 200) {
$data = array(
"apiName" => "submitIndexUponInstall",