dilusha_dasanayaka
dilusha_dasanayaka

Reputation: 1441

Skip csrf verification in pyrocms

I need to skip csrf verification for one of my endpoint. So I add that route to $except array in Anomaly\Streams\Platform\Http\Middleware\VerifyCsrfToken like this,

protected $except = [ "/payments/notify" ];

But still it not skip the csrf verification. So, please help me with this.

Upvotes: 0

Views: 90

Answers (3)

Ryan Thompson
Ryan Thompson

Reputation: 488

There are a few ways to do it listed in documentation. This page should get you started (see included links on page for more options too): https://pyrocms.com/documentation/streams-platform/1.6/the-basics/csrf-protection

Upvotes: 0

Piterden
Piterden

Reputation: 789

You can use the api middleware group:

enter image description here

Or either you can use the resource controller:

enter image description here

Upvotes: 0

Akash Kumar Verma
Akash Kumar Verma

Reputation: 3318

try this

protected $except = [
     "payments/notify",
     "payments/notify/*"
 ];

Upvotes: 0

Related Questions