mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-17 18:32:35 +00:00
Resolve "Add secure attribute to the jwt_token cookie"
This commit is contained in:
parent
ed479e6c87
commit
2c052dd5d9
3 changed files with 8 additions and 1 deletions
|
@ -5,6 +5,8 @@
|
|||
* Implemented a switch to disable all filters without deleting them.
|
||||
* Made it possible to order by fields via the rows listing endpoint.
|
||||
* Added community chat to the readme.
|
||||
* Made the cookies strict and secure.
|
||||
* Removed the redundant _DOMAIN variables.
|
||||
|
||||
## Released (2020-11-02)
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ export const setToken = (token, cookie) => {
|
|||
cookie.set(cookieTokenName, token, {
|
||||
path: '/',
|
||||
maxAge: 60 * 60 * 24 * 7,
|
||||
sameSite: 'strict',
|
||||
secure: true,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,10 @@ const cookieGroupName = 'baserow_group_id'
|
|||
|
||||
export const setGroupCookie = (groupId, cookie) => {
|
||||
if (process.SERVER_BUILD) return
|
||||
cookie.set(cookieGroupName, groupId)
|
||||
cookie.set(cookieGroupName, groupId, {
|
||||
sameSite: 'strict',
|
||||
secure: true,
|
||||
})
|
||||
}
|
||||
|
||||
export const unsetGroupCookie = (cookie) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue