Skip to content

Commit 5a3ad42

Browse files
authored
add: CSRF protection configuration options and documentation
1 parent 68cef7d commit 5a3ad42

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

config/csrf.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,15 @@
4343
|
4444
| This is a list of routes that will be excluded from CSRF
4545
| verification. This is useful for APIs that need to bypass
46-
| the CSRF verification. You can add route URIs or directly pass
47-
| in dynamic routes like '/items/{id}' or '/items/(\d+)'.
46+
| the CSRF verification.the csrf exempted routes routes can
47+
| be defined as
48+
| - directly i.e 'sample/route'
49+
| - predefined expressions i.e 'route/{int|slug|any|all}'
50+
|
51+
| @expression {int} - Integer values i.e order/{int} → order/10
52+
| @expression {slug} - Alphanumerical values i.e user/{slug} → user/janedoe98
53+
| @expression {any} - Every character except slashes (/) i.e blog/{any} → blog/hello-world-153
54+
| @expression {wild} - Every character including slashes i.e path/{wild} → path/any/file/path
4855
|
4956
*/
5057
'except' => [],

0 commit comments

Comments
 (0)