mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 14:44:43 -04:00
Add config option for cookie SameSite policy
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
23d54b8b4b
commit
824f910bfe
13 changed files with 41 additions and 25 deletions
|
@ -8,3 +8,5 @@ window.allowedUploadMimeTypes = <%- JSON.stringify(allowedUploadMimeTypes) %>
|
|||
window.linkifyHeaderStyle = '<%- linkifyHeaderStyle %>'
|
||||
|
||||
window.DROPBOX_APP_KEY = '<%- DROPBOX_APP_KEY %>'
|
||||
|
||||
window.cookiePolicy = '<%- cookiePolicy %>'
|
||||
|
|
|
@ -20,12 +20,12 @@ export function resetCheckAuth () {
|
|||
export function setLoginState (bool, id) {
|
||||
Cookies.set('loginstate', bool, {
|
||||
expires: 365,
|
||||
sameSite: 'strict'
|
||||
sameSite: window.cookiePolicy
|
||||
})
|
||||
if (id) {
|
||||
Cookies.set('userid', id, {
|
||||
expires: 365,
|
||||
sameSite: 'strict'
|
||||
sameSite: window.cookiePolicy
|
||||
})
|
||||
} else {
|
||||
Cookies.remove('userid')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue