Use port 43112 and wildcard IPv4 in PHP mode
This commit is contained in:
1 parent
c6928d66b2
commit
230743be33
5 files changed
+13
-14
No files matched your search
+2
-2
@@ -9,8 +9,8 @@ function failRequest($status, $message)
|
||||
|
||||
header('Cache-Control: no-store');
|
||||
$host = $_SERVER['HTTP_HOST'] ?? '';
|
||||
if (!preg_match('/\A(?:127\.0\.0\.1|localhost)(?::[0-9]{1,5})?\z/i', $host)) {
|
||||
failRequest(400, 'Use a loopback host');
|
||||
if (!preg_match('/\A[a-z0-9](?:[a-z0-9.-]{0,251}[a-z0-9])?(?::[0-9]{1,5})?\z/i', $host)) {
|
||||
failRequest(400, 'Invalid HTTP host');
|
||||
return;
|
||||
}
|
||||
if (($_SERVER['REQUEST_METHOD'] ?? '') !== 'GET') {
|
||||
|
||||
Reference in new issue
Block a user