feat: make secure flag of cookie configurable (#26)

This commit is contained in:
Akira Yamazaki 2024-08-24 22:18:38 +08:00 committed by GitHub
parent 9801ef453d
commit c4c1fd8aab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 10 additions and 2 deletions

View file

@ -27,9 +27,8 @@ export const {
maxAge: 60 * 60 * 24, // 24 hours
path: '/',
sameSite: 'lax',
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
secrets: [process.env.COOKIE_SECRET!],
secure: true
secure: process.env.COOKIE_SECURE !== 'false',
}
}
)