You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use PassPort sessions middleware app.runMiddleware() results in failure due to problems with getting headers. A similar problem was encountered in Issue #39 with a partial workaround.
Error seen:
node:_http_outgoing:721
const entry = headers[StringPrototypeToLowerCase(name)];
^
TypeError: Cannot read properties of undefined (reading 'set-cookie')
at ServerResponse.getHeader (node:_http_outgoing:721:24)
at setcookie (/node_modules/express-session/index.js:661:18)
at ServerResponse.<anonymous> (/node_modules/express-session/index.js:243:7)
at ServerResponse.writeHead (/node_modules/on-headers/index.js:35:16)
at ServerResponse._implicitHeader (node:_http_server:338:8)
at writetop (/node_modules/express-session/index.js:276:15)
at ServerResponse.end (/node_modules/express-session/index.js:343:16)
at allFailed (/node_modules/passport/lib/middleware/authenticate.js:177:11)
at attempt (/node_modules/passport/lib/middleware/authenticate.js:183:28)
at strategy.fail (/node_modules/passport/lib/middleware/authenticate.js:305:9)
When trying to use PassPort sessions middleware
app.runMiddleware()
results in failure due to problems with getting headers. A similar problem was encountered in Issue #39 with a partial workaround.Error seen:
References for above error:
Adding the following into
createRes()
seems to fix the issue while restoring the ability forres.getHeader()
to work.Proposed Solution (submitted in PR #57):
The text was updated successfully, but these errors were encountered: