mirror of
https://github.com/nextcloud/all-in-one.git
synced 2024-12-27 09:10:58 +08:00
f00aaf14cd
Signed-off-by: Simon L <szaimen@e.mail.de>
17 lines
497 B
PHP
17 lines
497 B
PHP
<?php
|
|
|
|
$domain = $_GET['domain'] ?? '';
|
|
|
|
if (strpos($domain, '.') === false) {
|
|
http_response_code(400);
|
|
} elseif (strpos($domain, '/') !== false) {
|
|
http_response_code(400);
|
|
} elseif (strpos($domain, ':') !== false) {
|
|
http_response_code(400);
|
|
} elseif (!filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)) {
|
|
http_response_code(400);
|
|
} elseif (filter_var($domain, FILTER_VALIDATE_IP)) {
|
|
http_response_code(400);
|
|
} else {
|
|
http_response_code(200);
|
|
}
|