1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-09 15:30:05 +00:00

chore(csrf): removed _csrf completely

This commit is contained in:
Saad Jutt
2022-09-30 03:07:21 +05:00
parent fe3e5088f8
commit fda6ad6356
2 changed files with 5 additions and 7 deletions

View File

@@ -7,7 +7,6 @@ export const getPreProgramVariables = (req: Request): PreProgramVars => {
const { user, accessToken } = req
const csrfToken = req.headers['x-xsrf-token'] || req.cookies['XSRF-TOKEN']
const sessionId = req.cookies['connect.sid']
const { _csrf } = req.cookies
const httpHeaders: string[] = []
@@ -16,7 +15,6 @@ export const getPreProgramVariables = (req: Request): PreProgramVars => {
const cookies: string[] = []
if (sessionId) cookies.push(`connect.sid=${sessionId}`)
if (_csrf) cookies.push(`_csrf=${_csrf}`)
if (cookies.length) httpHeaders.push(`cookie: ${cookies.join('; ')}`)