From b5ea0dfbc706d81e2d019e54d170d8cf5f054e3a Mon Sep 17 00:00:00 2001 From: Cody Date: Sat, 5 Oct 2024 13:57:36 -0700 Subject: [PATCH] Update Cleanup "setCookie" function notes options: secure, httpOnly, Samesite --- Oqtane.Server/wwwroot/js/interop.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Oqtane.Server/wwwroot/js/interop.js b/Oqtane.Server/wwwroot/js/interop.js index 725e8ce5..998559c5 100644 --- a/Oqtane.Server/wwwroot/js/interop.js +++ b/Oqtane.Server/wwwroot/js/interop.js @@ -6,19 +6,12 @@ Oqtane.Interop = { d.setTime(d.getTime() + (days * 24 * 60 * 60 * 1000)); var expires = "expires=" + d.toUTCString(); var cookieString = name + "=" + value + ";" + expires + ";path=/"; - - // Add SameSite attribute if (sameSite === "Lax" || sameSite === "Strict" || sameSite === "None") { cookieString += `; SameSite=${sameSite}`; } - - // Add Secure attribute if (secure) { cookieString += "; Secure"; } - - // Note: HttpOnly cannot be set here; it needs to be handled server-side. - document.cookie = cookieString; }, getCookie: function (name) {