0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Merge pull request #6327 from halfdan/6326-lskey

Set localStorage key based on subdir
This commit is contained in:
Kevin Ansfield 2016-01-12 21:22:20 +00:00
commit 22206f4b4f

View file

@ -1,6 +1,10 @@
import AdaptiveStore from 'ember-simple-auth/session-stores/adaptive';
import ghostPaths from 'ghost/utils/ghost-paths';
const paths = ghostPaths();
const keyName = `ghost${(paths.subdir.indexOf('/') === 0 ? `-${paths.subdir.substr(1)}` : ``) }:session`;
export default AdaptiveStore.extend({
localStorageKey: 'ghost:session',
cookieName: 'ghost:session'
localStorageKey: keyName,
cookieName: keyName
});