Exclude certain routes from csrf protection
This commit is contained in:
parent
03b8c1677c
commit
e95186e1fd
1 changed files with 7 additions and 0 deletions
|
@ -12,6 +12,13 @@ return Application::configure(basePath: dirname(__DIR__))
|
|||
health: '/up',
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware) {
|
||||
$middleware->validateCsrfTokens(except: [
|
||||
'api/token',
|
||||
'api/post',
|
||||
'api/media',
|
||||
'micropub/places',
|
||||
'webmention',
|
||||
]);
|
||||
$middleware->append(CSPHeader::class);
|
||||
})
|
||||
->withExceptions(function (Exceptions $exceptions) {
|
||||
|
|
Loading…
Add table
Reference in a new issue