Skip to content

Commit

Permalink
Merge pull request #234 from sasjs/issue147
Browse files Browse the repository at this point in the history
fix(security): missing cookie flags are added
  • Loading branch information
allanbowe authored Jul 19, 2022
2 parents 1b234eb + 526402f commit cb84c3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/src/routes/web/web.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import express from 'express'
import { cookieOptions } from '../../app'
import { WebController } from '../../controllers/web'
import { authenticateAccessToken, desktopRestrict } from '../../middlewares'
import { authorizeValidation, loginWebValidation } from '../../utils'
Expand All @@ -13,7 +14,7 @@ webRouter.get('/', async (req, res) => {
} catch (_) {
response = 'Web Build is not present'
} finally {
res.cookie('XSRF-TOKEN', req.csrfToken())
res.cookie('XSRF-TOKEN', req.csrfToken(), cookieOptions)

return res.send(response)
}
Expand Down

0 comments on commit cb84c3e

Please sign in to comment.