🧑‍💻 ignore csrf check when not in production

This commit is contained in:
DrMaxNix 2024-07-24 16:57:27 +02:00
parent 6dbf54e35b
commit a794127f5f
3 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@
// CHECK CSRF PROTECTION //
$x_cookieless_csrf_protection = getallheaders()["x-cookieless-csrf-protection"] ?? null;
if($x_cookieless_csrf_protection !== "42"){
if(\Flake\Env::IS_PRODUCTION and $x_cookieless_csrf_protection !== "42"){
// show an excuse page
Excuse::show("invalid_csrf_token");
}

View File

@ -6,7 +6,7 @@
// CHECK CSRF PROTECTION //
$x_cookieless_csrf_protection = getallheaders()["x-cookieless-csrf-protection"] ?? null;
if($x_cookieless_csrf_protection !== "42"){
if(\Flake\Env::IS_PRODUCTION and $x_cookieless_csrf_protection !== "42"){
// show an excuse page
Excuse::show("invalid_csrf_token");
}

View File

@ -5,7 +5,7 @@
// CHECK CSRF PROTECTION //
$x_cookieless_csrf_protection = getallheaders()["x-cookieless-csrf-protection"] ?? null;
if($x_cookieless_csrf_protection !== "42"){
if(\Flake\Env::IS_PRODUCTION and $x_cookieless_csrf_protection !== "42"){
// show an excuse page
Excuse::show("invalid_csrf_token");
}