Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable csrf for specific controller or method, when it global enabled in config #3946

Closed
wants to merge 1 commit into from

Conversation

webquail
Copy link
Contributor

@webquail webquail commented Jul 2, 2015

Disable csrf for specific controller or method, when it global enabled in config.
Just use in Controller constructor:

public function __construct(){
  parent::__construct();
  $this->security->disable_csrf = TRUE;
}

Or in Controller method:

public function create(){
  $this->security->disable_csrf = TRUE;
  /*some code*/
}

@narfbg
Copy link
Contributor

narfbg commented Jul 3, 2015

No ... csrf_exclude_uris is enough.

@narfbg narfbg closed this Jul 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants