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 9b522457ef

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
});