public function checkCsrf() { if (Koala::getEnv('csrf')) { $token = koala::$app->cookie->get('__csrf__'); $post = $this->post(['__csrf__' => '']); if ($post['__csrf__'] != $token) { throw new KoalaException("csrf"); } } }
public function checkCsrf() { if (Koala::getEnv('csrf')) { $token = koala::$app->cookie->get('__csrf__'); $post = $this->post(['__csrf__' => '']); if ($post['__csrf__'] != $token) { throw new KoalaException("csrf"); } } }