Question Codeigniter CSRF

I'm just wondering if there is any option where I can disable CSRF in a specific controller / method. I have another site that pings my site but is blocked due to CSRF.

Is there any way around this?

+5
source share
1 answer

Create a pre_system hook , then enter the following code inside your hook controller:

if(stripos($_SERVER["REQUEST_URI"],'/controller/function') !== FALSE)
{
    $CFG =& load_class('Config', 'core');
    $CFG->set_item('csrf_protection', FALSE);
}

Link: http://codeigniter.com/forums/viewreply/869900/

+7
source

All Articles