Custom Middleware

josefpreeo - 4 months ago

My final objective is to create a POST route that doesn't require the csrftoken check. I created a route with the reference to a custom Middleware: 'checkout/ipn' => [ 'uses' => 'Preeo\CustomPageHandlerExtension\Http\Controller\[email protected]', 'verb' => 'post', 'middleware' => 'Preeo\LearningSystemModule\Http\Middleware\VerifyCsrfToken' ] and the Middleware extends Anomaly\Streams\Platform\Http\Middleware\VerifyCsrfToken and has the following code: ` class VerifyCsrfToken extends BaseVerifier { /**

  • The URIs that should be excluded from CSRF verification.
  • @var array / protected $except = [ 'checkout/ipn/' ]; } ` Unfortunately this is still not working though - any help?

ryanthompson - 4 months ago

You can also add "csrf" => false to the route