diff options
Diffstat (limited to 'public/js/lib/common')
-rw-r--r-- | public/js/lib/common/constant.ejs | 2 | ||||
-rw-r--r-- | public/js/lib/common/login.js | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/public/js/lib/common/constant.ejs b/public/js/lib/common/constant.ejs index 114a9077..2a32c333 100644 --- a/public/js/lib/common/constant.ejs +++ b/public/js/lib/common/constant.ejs @@ -8,3 +8,5 @@ window.allowedUploadMimeTypes = <%- JSON.stringify(allowedUploadMimeTypes) %> window.linkifyHeaderStyle = '<%- linkifyHeaderStyle %>' window.DROPBOX_APP_KEY = '<%- DROPBOX_APP_KEY %>' + +window.cookiePolicy = '<%- cookiePolicy %>' diff --git a/public/js/lib/common/login.js b/public/js/lib/common/login.js index 931c115f..3f7a3e4d 100644 --- a/public/js/lib/common/login.js +++ b/public/js/lib/common/login.js @@ -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') |