Skip to content

Commit

Permalink
fix(cookie): change cookie name from numeric to alpha (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
TakahashiNguyen authored Feb 17, 2025
2 parents 4c3c1db + b0ed8ad commit 93ddda0
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 93ddda0

Please sign in to comment.