mirror of
https://github.com/pi-hole/web.git
synced 2026-04-25 19:29:20 +01:00
Change tabs to spaces
Signed-off-by: Adyanth H <33192449+adyanth@users.noreply.github.com>
This commit is contained in:
@@ -47,12 +47,12 @@ function check_cors() {
|
||||
$virtual_host = getenv('VIRTUAL_HOST');
|
||||
if (! empty($virtual_host))
|
||||
array_push($AUTHORIZED_HOSTNAMES, $virtual_host);
|
||||
|
||||
# Allow user set CORS
|
||||
|
||||
# Allow user set CORS
|
||||
$cors_hosts = getenv('CORS_HOSTS');
|
||||
if (! empty($cors_hosts))
|
||||
array_push($AUTHORIZED_HOSTNAMES, ...explode(",", $cors_hosts));
|
||||
|
||||
|
||||
// Since the Host header is easily manipulated, we can only check if it's wrong and can't use it
|
||||
// to validate that the client is authorized, only unauthorized.
|
||||
$server_host = $_SERVER['HTTP_HOST'];
|
||||
|
||||
Reference in New Issue
Block a user