mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-17 21:41:49 +03:00
Merge pull request #6327 from halfdan/6326-lskey
Set localStorage key based on subdir
This commit is contained in:
commit
9b522457ef
@ -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
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user