mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
feat: using httpOnly cookie
This commit is contained in:
parent
d7633fde99
commit
ff38201215
@ -50,6 +50,7 @@ const Callback = nc<ApiRequest, NextApiResponse>()
|
||||
res.setHeader('set-cookie', serialize('token', userToken, {
|
||||
expires: new Date(info.exp * 1000),
|
||||
secure: process.env.NODE_ENV === 'production',
|
||||
httpOnly: true,
|
||||
path: '/'
|
||||
}))
|
||||
res.redirect(301, '/callback/discord')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user