Commit 8a2ae8de authored by Robert Speicher's avatar Robert Speicher

Canary toggle compatible with next.gitlab.com

Previously the `g x` hotkey would set the cookie on the root domain only
(i.e., `gitlab.com`), whereas our next.gitlab.com implementation uses
`.gitlab.com` with a leading period.
parent 17bb2f47
......@@ -173,7 +173,12 @@ export default class Shortcuts {
e.preventDefault();
const canaryCookieName = 'gitlab_canary';
const currentValue = parseBoolean(Cookies.get(canaryCookieName));
Cookies.set(canaryCookieName, (!currentValue).toString(), { expires: 365, path: '/' });
Cookies.set(canaryCookieName, (!currentValue).toString(), {
expires: 365,
path: '/',
// next.gitlab.com uses a leading period. See https://gitlab.com/gitlab-org/gitlab/-/issues/350186
domain: `.${window.location.hostname}`,
});
refreshCurrentPage();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment