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:
Jonny Barnes 2024-03-23 14:20:06 +00:00 committed by GitHub
commit 174cd4db33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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) {