Skip to content

Commit

Permalink
fix(cookie): change cookie name from numeric to alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
takahashinguyen committed Feb 17, 2025
1 parent 4c3c1db commit b0ed8ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/utils/server.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ export async function registerServerPlugins(
brotliOptions: { params: { [constants.BROTLI_PARAM_QUALITY]: 6 } },
})
.register(fastifySecuredSession, {
cookieName: (6).numeric.toBase64Url,
cookieName: (18).random.alpha.toBase64Url,
cookie: { ...cookieOptions, signed: true },
secret,
key: readFileSync('securedSessionKey'),
salt: (256).string,
})
.register(fastifyCsrf, {
sessionKey: name,
cookieKey: (6).alpha.toBase64Url,
cookieKey: (18 + (18).random).alpha.toBase64Url,
cookieOpts: cookieOptions,
sessionPlugin: '@fastify/secure-session',
csrfOpts: { validity: (180).s2ms },
Expand Down

0 comments on commit b0ed8ad

Please sign in to comment.