Skip to content

Instantly share code, notes, and snippets.

@NaveenDA
Created December 31, 2018 12:46
Show Gist options
  • Select an option

  • Save NaveenDA/c51fdd91d0b57666c0253d6d2788abdb to your computer and use it in GitHub Desktop.

Select an option

Save NaveenDA/c51fdd91d0b57666c0253d6d2788abdb to your computer and use it in GitHub Desktop.
A sample code for express-session.js
var app = express()
app.set('trust proxy', 1) // trust first proxy
app.use(session({
secret: 'keyboard cat',
resave: false,
saveUninitialized: true,
cookie: { secure: true }
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment