diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-26 06:16:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-26 06:16:17 +0300 |
commit | 037063e3004a6a86352adbc73d3034e9aaade32d (patch) | |
tree | d6a0e4d7136253aa032a56027defa5e311043092 /app/assets/javascripts/behaviors | |
parent | 7a6bc43978731a70fe92d1d487e823a823b7f84e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/behaviors')
-rw-r--r-- | app/assets/javascripts/behaviors/shortcuts/shortcuts.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/behaviors/shortcuts/shortcuts.js b/app/assets/javascripts/behaviors/shortcuts/shortcuts.js index ac2a4184176..acb2355852d 100644 --- a/app/assets/javascripts/behaviors/shortcuts/shortcuts.js +++ b/app/assets/javascripts/behaviors/shortcuts/shortcuts.js @@ -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(); } |