Skip to content

Instantly share code, notes, and snippets.

@keiosweb
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keiosweb/cbb97aaf8542d552fbb5 to your computer and use it in GitHub Desktop.
Save keiosweb/cbb97aaf8542d552fbb5 to your computer and use it in GitHub Desktop.
Possible csrf disabling syntax for OctoberCMS
public function boot() {
$request = $this->app->make('request');
if ($request->is('should/not/be/csrf/checked/path/*')) {
$this->app->make('csrf')->disable();
}
}
// or, alternatively with facades
public function boot() {
if (Request::is('should/not/be/csrf/checked/path/*')) {
Csrf::disable();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment