Trim excess whitespace

Signed-off-by: a1346054 <36859588+a1346054@users.noreply.github.com>
This commit is contained in:
a1346054
2021-09-15 20:25:30 +00:00
parent 48c63c0a0b
commit 26f0203137
6 changed files with 10 additions and 10 deletions

View File

@@ -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
$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'];
@@ -105,7 +105,7 @@ function check_csrf($token) {
// Start a new PHP session (or continue an existing one)
// Prevents javascript XSS attacks aimed to steal the session ID
ini_set('session.cookie_httponly', 1);
// Prevent Session ID from being passed through URLs
// Prevent Session ID from being passed through URLs
ini_set('session.use_only_cookies', 1);
session_start();
}