fix(api): adjust levels for cookie related logs (#59946)

This commit is contained in:
Mrugesh Mohapatra
2025-04-25 00:50:07 +05:30
committed by GitHub
parent 061df27f1d
commit ff38233f96
3 changed files with 4 additions and 4 deletions

View File

@@ -23,7 +23,7 @@ const csrf: FastifyPluginCallback = (fastify, _options, done) => {
// tokens since we know we can provide this one
getToken: req => req.headers[CSRF_HEADER] as string,
cookieOpts: { signed: false, sameSite: 'strict' },
logLevel: 'debug'
logLevel: 'debug' // TODO: change to trace
});
// All routes except signout should add a CSRF token to the response
@@ -32,7 +32,7 @@ const csrf: FastifyPluginCallback = (fastify, _options, done) => {
const isSignout = req.url === '/signout' || req.url === '/signout/';
if (!isSignout) {
logger.debug('Adding CSRF token to response');
logger.trace('Adding CSRF token to response');
const token = reply.generateCsrf();
void reply.setCookie(CSRF_COOKIE, token, {
sameSite: 'strict',