CodeIgniter Forums

Full Version: csrf_exclude_uris not work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
$config['csrf_protection'] = true;
$config['csrf_token_name'] = 'csrf_token_test';
$config['csrf_cookie_name'] = 'csrf_cookie_test';
$config['csrf_expire'] = 7200;
$config['csrf_regenerate'] = TRUE;
$config['csrf_exclude_uris'] = array('/assistant_dashboard/upload.html');
I upload file to '/assistant_dashboard/upload.html' but the 'csrf_exclude_uris' not work.
Please show me how to do?
The URIs should follow the pattern of controller/method and should not begin with a slash. So assuming the controller is assistant_dashboard and the method is upload the setting should be

$config['csrf_exclude_uris'] = array('assistant_dashboard/upload');