Created
January 4, 2014 12:15
-
-
Save wmandai/8254861 to your computer and use it in GitHub Desktop.
Codeigniter disable CSRF in specific pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add this to your config.php file | |
if (stripos($_SERVER["REQUEST_URI"],'/controller/method') === FALSE) { | |
$config['csrf_protection'] = TRUE; | |
}else{ | |
$config['csrf_protection'] = FALSE; | |
} | |
//the rest of the code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For anyone looking at targeting list of links which can be grouped in arrays see my answer HERE