mirror of
https://gitlab.com/octospacc/octospacc.gitlab.io
synced 2025-01-10 16:06:18 +01:00
Fix WuppiMini app cookies
This commit is contained in:
parent
e6e32316f9
commit
dc0795d138
@ -209,7 +209,7 @@ const genCsrfToken = (accountString, time) => (isEnvServer && time && crypto.scr
|
|||||||
const matchCsrfToken = (bodyParams, accountString) => (isEnvServer ? bodyParams.formToken === genCsrfToken(accountString, bodyParams.formTime) : true);
|
const matchCsrfToken = (bodyParams, accountString) => (isEnvServer ? bodyParams.formToken === genCsrfToken(accountString, bodyParams.formTime) : true);
|
||||||
|
|
||||||
// try to use the built-in cookie API, fallback to a Storage-based wrapper in case it fails (for example on file:///)
|
// try to use the built-in cookie API, fallback to a Storage-based wrapper in case it fails (for example on file:///)
|
||||||
const clientCookieApi = (isEnvBrowser && (document.cookie || (!document.cookie && (document.cookie = '_=_') && document.cookie) ? document.cookie : (set) => {
|
const clientCookieApi = (isEnvBrowser && (document.cookie || (!document.cookie && (document.cookie = '_=_') && document.cookie) ? (set) => (set ? (document.cookie = set) : document.cookie) : (set) => {
|
||||||
if (set) {
|
if (set) {
|
||||||
let api = sessionStorage;
|
let api = sessionStorage;
|
||||||
const tokens = set.split(';');
|
const tokens = set.split(';');
|
||||||
|
Loading…
Reference in New Issue
Block a user