CodeIgniter Forums
csrf regenerate set to false? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: csrf regenerate set to false? (/showthread.php?tid=66381)



csrf regenerate set to false? - wolfgang1983 - 10-17-2016

Hello,

If I have this csrf_regenerate set to TRUE. And submit form and has error then reload form.

I get errorĀ 


Code:
The action you have requested is not allowed.



How ever if i have this csrf_regenerate set to FALSE.

Do not get any errors.

Is it safe to set have this csrf_regenerate set to false?

PHP Code:
$config['csrf_protection'] = TRUE;
$config['csrf_token_name'] = 'csrf_test_name';
$config['csrf_cookie_name'] = 'csrf_cookie_name';
$config['csrf_expire'] = 7200;
$config['csrf_regenerate'] = FALSE;
$config['csrf_exclude_uris'] = array();