From f0149f6fd8bd4f3dbe16b921e8bba04ae6f0d94c Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Thu, 4 Apr 2024 12:06:21 +0530 Subject: [PATCH] fix: redirect console user domain name --- apps/OpenSign/src/layout/HomeLayout.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/OpenSign/src/layout/HomeLayout.js b/apps/OpenSign/src/layout/HomeLayout.js index 3554bcb9a..aa1dc0593 100644 --- a/apps/OpenSign/src/layout/HomeLayout.js +++ b/apps/OpenSign/src/layout/HomeLayout.js @@ -51,7 +51,8 @@ const HomeLayout = () => { }, []); //function to use save data in cookies storage const saveCookies = () => { - const domainName = window.location.hostname; //app.opensignlabs.com + const main_Domain = window.location.origin; + const domainName = window.location.hostname; //app.opensignlabs.com // Find the index of the first dot in the string const indexOfFirstDot = domainName.indexOf("."); // Remove the first dot and get the substring starting from the next character @@ -60,7 +61,7 @@ const HomeLayout = () => { secure: true, domain: updateDomain }); - setCookie("main_Domain", domainName, { + setCookie("main_Domain", main_Domain, { secure: true, domain: updateDomain });