Skip to content

Commit

Permalink
Fix cookie
Browse files Browse the repository at this point in the history
Signed-off-by: Arnav Gupta <[email protected]>
  • Loading branch information
championswimmer committed May 15, 2020
1 parent c3119d6 commit 857e507
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ const sess = {
secret: secrets.secret,
resave: true,
saveUninitialized: true,
cookie: { maxAge: 360000 }
cookie: { maxAge: 360000, secure: false, httpOnly: false }
}

const app = express()

if (app.get('env') === 'production') {
app.set('trust proxy', 1) // trust first proxy
sess.cookie.secure = true // serve secure cookies
}

app.engine(
Expand Down

0 comments on commit 857e507

Please sign in to comment.