This commit is contained in:
Chris 2025-06-10 11:55:13 +02:00
parent 5df5a0ad7a
commit 6e0795bbdf

View File

@ -30,7 +30,12 @@ switch ($url[0]) {
}
$ip = getUserIP();
$viewport = $_REQUEST['viewport'];
$viewport = $_REQUEST['viewport'] ?? '1024x768';
if (!preg_match('/^\d+x\d+$/', $viewport)) {
header('HTTP/1.0 400 Bad Request');
echo 'Invalid viewport format. Use WIDTHxHEIGHT (e.g., 1024x768)';
exit;
}
$js = $_REQUEST['js'] == 'false' ? false : true;
$serverUrl = 'http://localhost:4444';