Created
April 4, 2012 19:43
-
-
Save ovaillancourt/2305053 to your computer and use it in GitHub Desktop.
Configuring express session store to work across subdomain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.use(express.cookieParser()); | |
app.use(express.session({ | |
secret: 'MySecret', //Should be the same across all the apps that share the same sessions. | |
store: Bla, //Init your store here | |
cookie: {domain: '.mydomain.com'} //The point in front here is important so that the same sessions work across all sub-domains. | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment