0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Set localStorage key based on subdir

closes #6326
This commit is contained in:
Fabian Becker 2016-01-12 16:38:38 +01:00
parent 248c3da667
commit d57f189294

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