From 1c0213f28e423b28c17bf7b377086a782ba88b50 Mon Sep 17 00:00:00 2001
From: Mike Greiling <mike@pixelcog.com>
Date: Mon, 24 Oct 2016 16:31:01 -0500
Subject: [PATCH] set default path for all calls to Cookies.set()

---
 app/assets/javascripts/application.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index 44da01effde..817337daf54 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -149,6 +149,10 @@
     $document = $(document);
     $window = $(window);
     $body = $('body');
+
+    // Set the default path for all cookies to GitLab's root directory
+    Cookies.defaults.path = gon.relative_url_root || '/';
+
     gl.utils.preventDisabledButtons();
     bootstrapBreakpoint = bp.getBreakpointSize();
     $(".nav-sidebar").niceScroll({
-- 
GitLab