@optimiser/common 1.0.344 → 1.0.346
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/connection.js +8 -0
- package/dist/lib/utility.js +2 -2
- package/package.json +1 -1
package/dist/lib/connection.js
CHANGED
|
@@ -86,6 +86,14 @@ var Connection = /** @class */ (function () {
|
|
|
86
86
|
* @description middleware function : to validate the cookies that are passed in request
|
|
87
87
|
*/
|
|
88
88
|
this.ValidateSession = function (req, res, next) {
|
|
89
|
+
// If the header 'x-access-token' exists, override the req.cookies.msp_d.token
|
|
90
|
+
if (req.headers['x-access-token']) {
|
|
91
|
+
if (!req.cookies)
|
|
92
|
+
req.cookies = {};
|
|
93
|
+
if (!req.cookies.msp_d)
|
|
94
|
+
req.cookies.msp_d = {};
|
|
95
|
+
req.cookies.msp_d.token = req.headers['x-access-token'];
|
|
96
|
+
}
|
|
89
97
|
if (req.cookies && req.cookies.msp_d && _this.redisClient) {
|
|
90
98
|
_this.redisClient.hgetall(req.cookies.msp_d.token, function (err, tokenData) {
|
|
91
99
|
if (tokenData === undefined || tokenData === null || Object.keys(tokenData).length == 0) {
|
package/dist/lib/utility.js
CHANGED
|
@@ -5412,8 +5412,8 @@ function GenerateBase64QRCodeData(data, options) {
|
|
|
5412
5412
|
case 0:
|
|
5413
5413
|
_a.trys.push([0, 2, , 3]);
|
|
5414
5414
|
qrOptions = {
|
|
5415
|
-
width: options.width ||
|
|
5416
|
-
height: options.height ||
|
|
5415
|
+
width: options.width || 300,
|
|
5416
|
+
height: options.height || 300,
|
|
5417
5417
|
color: {
|
|
5418
5418
|
dark: options.color.dark || '#000000',
|
|
5419
5419
|
light: options.color.light || '#ffffff',
|