How to use express session to set-cookie in browser? cause when iam setting its getting rejected by browser

22 views Asked by At

`I am running backend in a k8s cluster and ingress-nginx. The cookie is getting send to the browser. Confirmed with postman. But browser is rejecting it.

app.use(
session({
  secret: 'keyboard cat',
  resave: false,
  saveUninitialized: false,
  store: redisStore,
  cookie: {
    sameSite: configKeys.NODE_ENV === 'Production' ? 'strict' : 'none',
    secure: configKeys.NODE_ENV === 'Production'
  }
})

) this is my configuration.

i want to set the cookie in the browser. Is there no way to use express-session in development without https? Need to configure ingress-nginx? `

0

There are 0 answers