mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
update condition to prevent host to be indexed if not https/accessible public
This commit is contained in:
parent
d80a623e40
commit
b44f0b19a2
2 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue