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:
commit
22206f4b4f
1 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,10 @@
|
||||||
import AdaptiveStore from 'ember-simple-auth/session-stores/adaptive';
|
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({
|
export default AdaptiveStore.extend({
|
||||||
localStorageKey: 'ghost:session',
|
localStorageKey: keyName,
|
||||||
cookieName: 'ghost:session'
|
cookieName: keyName
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue