diff --git a/.gitignore b/.gitignore index f5da770..848a58c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ .idea composer.lock -vendor/ -demo-project/vendor \ No newline at end of file +vendor/ \ No newline at end of file diff --git a/src/Pecee/CsrfToken.php b/src/Pecee/CsrfToken.php index 6080827..3549243 100644 --- a/src/Pecee/CsrfToken.php +++ b/src/Pecee/CsrfToken.php @@ -3,7 +3,7 @@ namespace Pecee; class CsrfToken { - const CSRF_KEY = 'XSRF-TOKEN'; + const CSRF_KEY = 'CSRF-TOKEN'; protected $token; @@ -60,7 +60,7 @@ class CsrfToken */ public function getToken() { - if ($this->hasToken()) { + if ($this->hasToken() === true) { return $_COOKIE[static::CSRF_KEY]; }