Skip to content

Commit 960a633

Browse files
danieldaniel
daniel
authored and
daniel
committed
1 parent 996d4eb commit 960a633

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugin/Cache/Cache.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ public function getStart() {
7777
return true;
7878
}
7979

80-
$whitelistedFiles = array('user.php', 'status.php', 'canWatchVideo.json.php');
80+
$whitelistedFiles = array('user.php', 'status.php', 'canWatchVideo.json.php', '/login', '/status');
8181
$blacklistedFiles = array('videosAndroid.json.php');
8282
$baseName = basename($_SERVER["SCRIPT_FILENAME"]);
83-
if (in_array($baseName, $whitelistedFiles)) {
83+
if (in_array($baseName, $whitelistedFiles) || in_array($_SERVER['REQUEST_URI'], $whitelistedFiles) ) {
8484
return true;
8585
}
8686

@@ -115,7 +115,7 @@ public function getStart() {
115115
}
116116
}
117117

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

132132
private function isBlacklisted(){
133-
$blacklistedFiles = array('videosAndroid.json.php', 'status');
133+
$blacklistedFiles = array('videosAndroid.json.php');
134134
$baseName = basename($_SERVER["SCRIPT_FILENAME"]);
135135
return in_array($baseName, $blacklistedFiles);
136136
}

0 commit comments

Comments
 (0)