1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00

Add check for empty REQUEST_METHOD in stopHeadRequests condition

This commit is contained in:
Daniel Neto 2025-09-15 11:54:07 -03:00
parent 4e452049bc
commit f27a036e70

View file

@ -6,7 +6,7 @@ if (!isset($global['skippPlugins'])) {
if (!empty($global['stopHeadRequests'])) {
if ($_SERVER['REQUEST_METHOD'] === 'HEAD') {
if (!empty($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'HEAD') {
// Optionally, you can send a specific status code or header before exiting
http_response_code(200); // Set response code if needed
error_log('stopIfIsHeadRequest '.$_SERVER['HTTP_USER_AGENT']);