Skip to content

Commit

Permalink
Build 3.25.1: Allow minimal qewd_send_jwt_as_cookie to be specified a…
Browse files Browse the repository at this point in the history
…s true
  • Loading branch information
robtweed committed Nov 12, 2018
1 parent 1495b67 commit b040ef1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,13 @@ function handleMessage(req, res, next) {
delete message.qewd_response_headers;
}

if (typeof message.qewd_send_jwt_as_cookie === 'object' && message.token) {
if (message.qewd_send_jwt_as_cookie && message.token) {

// move JWT from response to a Set-Cookie header

if (typeof message.qewd_send_jwt_as_cookie !== 'object') {
message.qewd_send_jwt_as_cookie = {};
}
cookie = message.qewd_send_jwt_as_cookie.name || 'JSESSIONID';
cookie = cookie + '=' + message.token;
directives = message.qewd_send_jwt_as_cookie.directives;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ewd-qoper8-express",
"version": "3.25.0",
"version": "3.25.1",
"description": "ewd-qoper8 message handling and router for Express",
"main": "index.js",
"engines": {
Expand Down

0 comments on commit b040ef1

Please sign in to comment.