feat(api): set log level for csrf errors (#59228)

This commit is contained in:
Oliver Eyton-Williams
2025-03-13 23:24:41 +01:00
committed by GitHub
parent 35cbc00b70
commit f6b57883e1
4 changed files with 55 additions and 4 deletions

View File

@@ -22,7 +22,8 @@ const csrf: FastifyPluginCallback = (fastify, _options, done) => {
///Ignore all other possible sources of CSRF
// tokens since we know we can provide this one
getToken: req => req.headers[CSRF_HEADER] as string,
cookieOpts: { signed: false, sameSite: 'strict' }
cookieOpts: { signed: false, sameSite: 'strict' },
logLevel: 'debug'
});
// All routes except signout should add a CSRF token to the response