diff --git a/plugins/locale-observer.js b/plugins/locale-observer.js index f5b7c032e..09cf52c70 100644 --- a/plugins/locale-observer.js +++ b/plugins/locale-observer.js @@ -1,3 +1,7 @@ +import { config } from '../config/environment' + +console.log({ domain: config.siteDomain }) + export default function ({ app }) { app.i18n.onBeforeLanguageSwitch = (oldLocale, newLocale) => { _setLocaleCookie(newLocale) @@ -5,5 +9,5 @@ export default function ({ app }) { } function _setLocaleCookie(locale) { - document.cookie = `locale=${locale}; path=/; max-age=31536000` + document.cookie = `locale=${locale}; path=/; domain=${config.siteDomain}; max-age=31536000` }