loleaflet/src/control/Toolbar.js |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1c296d5947df4c7a17a6035c4406df917c1c2f79
Author:     Muhammet Kara <muhammet.k...@collabora.com>
AuthorDate: Mon Apr 20 17:18:08 2020 +0300
Commit:     Muhammet Kara <muhammet.k...@collabora.com>
CommitDate: Mon Apr 20 16:36:04 2020 +0200

    Welcome: Prevent a million cookies during development
    
    By default, cookies are stored with full path of
    the web app, and we have an extension made of the
    hash of the build. So each new commit means a new
    web app for the browser, causing many cookies stored,
    and the welcome dialog being shown after each commit.
    
    From now on, we will be storing our cookies to the
    '/loleaflet' path.
    
    Change-Id: I4cb25ab0a53c4743cb929a7f6c20ab019da29409
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92575
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Muhammet Kara <muhammet.k...@collabora.com>

diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 3ed636444..8def69a6b 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -396,14 +396,14 @@ L.Map.include({
                                if (!calledFromMenu) {
                                        var WSDVerCookie = 'WSDWelcomeVersion=' 
+ map._socket.WSDServer.Version;
                                        // Cookie will not expire for a year, 
and it will not be sent to other domains
-                                       WSDVerCookie += '; max-age=31536000; 
SameSite=Strict';
+                                       WSDVerCookie += '; max-age=31536000; 
SameSite=Strict; path=/loleaflet';
                                        document.cookie = WSDVerCookie;
                                }
                        })
                        .fail(function() {
                                // Welcome dialog disabled in loolwsd.xml or 
nonexistant for some other reason
                                // Let's check back in a day (60 x 60 x 24 = 
86400 seconds)
-                               var welcomeDisabledCookie = 
'WSDWelcomeDisabled=true; max-age=86400; SameSite=Strict';
+                               var welcomeDisabledCookie = 
'WSDWelcomeDisabled=true; max-age=86400; SameSite=Strict; path=/loleaflet';
                                document.cookie = welcomeDisabledCookie;
 
                                if (calledFromMenu)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to