Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel authored and daniel committed Sep 17, 2019
1 parent 996d4eb commit 960a633
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugin/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ public function getStart() {
return true;
}

$whitelistedFiles = array('user.php', 'status.php', 'canWatchVideo.json.php');
$whitelistedFiles = array('user.php', 'status.php', 'canWatchVideo.json.php', '/login', '/status');
$blacklistedFiles = array('videosAndroid.json.php');
$baseName = basename($_SERVER["SCRIPT_FILENAME"]);
if (in_array($baseName, $whitelistedFiles)) {
if (in_array($baseName, $whitelistedFiles) || in_array($_SERVER['REQUEST_URI'], $whitelistedFiles) ) {
return true;
}

Expand Down Expand Up @@ -115,7 +115,7 @@ public function getStart() {
}
}

if($isBot && $_SERVER['REQUEST_URI'] !== '/login' && strpos($_SERVER['REQUEST_URI'], 'youPHPTubeEncoder') === false){
if($isBot && strpos($_SERVER['REQUEST_URI'], 'youPHPTubeEncoder') === false){
if(empty($_SERVER['HTTP_USER_AGENT'])){
$_SERVER['HTTP_USER_AGENT'] = "";
}
Expand All @@ -130,7 +130,7 @@ public function getStart() {
}

private function isBlacklisted(){
$blacklistedFiles = array('videosAndroid.json.php', 'status');
$blacklistedFiles = array('videosAndroid.json.php');
$baseName = basename($_SERVER["SCRIPT_FILENAME"]);
return in_array($baseName, $blacklistedFiles);
}
Expand Down

0 comments on commit 960a633

Please sign in to comment.