Last active
August 29, 2015 14:23
-
-
Save keiosweb/cbb97aaf8542d552fbb5 to your computer and use it in GitHub Desktop.
Possible csrf disabling syntax for OctoberCMS
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
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