mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-14 04:00:42 -04:00
fix(api): adjust levels for cookie related logs (#59946)
This commit is contained in:
committed by
GitHub
parent
061df27f1d
commit
ff38233f96
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user