Skip to content

Commit

Permalink
Add cookie handling for Franz 5.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adlk committed Mar 18, 2022
1 parent df9960b commit fb76f0f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,13 @@ module.exports = Franz => class MicrosoftTeams extends Franz {
'skypeforbusiness.com',
];
}

// we need to allow all cookies for ms teams
onHeadersReceived(details, callback) {
if (details.responseHeaders && details.responseHeaders['Set-Cookie'] && details.responseHeaders['Set-Cookie'].length && !details.responseHeaders['Set-Cookie'][0].includes('SameSite=none')) {
// eslint-disable-next-line no-param-reassign
details.responseHeaders['Set-Cookie'][0] = `${details.responseHeaders['Set-Cookie'][0]}; SameSite=none`;
}
callback({ cancel: false, responseHeaders: details.responseHeaders });
}
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "msteams",
"name": "Microsoft Teams",
"version": "1.2.1",
"version": "1.3.0",
"description": "Microsoft Teams",
"main": "index.js",
"author": "Stefan Malzner <stefan@adlk.io>",
Expand Down

0 comments on commit fb76f0f

Please sign in to comment.