Merge pull request #1360 from jonnybarnes/1359-micropub-token-endpoint-broken-after-laravel-11-upgrade
Exclude certain routes from csrf protection
This commit is contained in:
commit
174cd4db33
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