Skip to content

Commit 5cd1b90

Browse files
author
Pavle
committed
Version 1.2.3
1 parent cb6da3f commit 5cd1b90

File tree

4 files changed

+54
-31
lines changed

4 files changed

+54
-31
lines changed

ViewerRequest/cloudFrontHttpContextProvider.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,16 @@
2727
return request.clientIp;
2828
},
2929
getCookieValue: function (cookieKey) {
30+
3031
if (!this.parsedCookieDic) {
3132
this.parsedCookieDic = __parseCookies(request.headers);
3233
}
33-
return decodeURIComponent(this.parsedCookieDic[cookieKey]);
34+
var cookieValue = this.parsedCookieDic[cookieKey];
35+
36+
if(cookieValue)
37+
return decodeURIComponent(cookieValue);
38+
39+
return cookieValue;
3440
}
3541
};
3642
return httpRequest;
@@ -77,4 +83,4 @@ function __parseCookies(headers) {
7783
}
7884
}
7985
return parsedCookie;
80-
}
86+
}

ViewerRequest/index.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,13 @@ async function handleRequest(request) {
4949
response.headers['cache-control'] = [
5050
{
5151
key: 'Cache-Control',
52-
value: 'no-cache, no-store, must-revalidate'
52+
value: 'no-cache, no-store, must-revalidate, max-age=0'
5353
}];
5454
response.headers['pragma'] = [
5555
{
5656
key: 'Pragma',
5757
value: 'no-cache'
5858
}];
59-
response.headers['pragma'] = [
60-
{
61-
key: 'Pragma',
62-
value: 'no-cache, no-store, must-revalidate'
63-
}];
6459
response.headers['expires'] = [
6560
{
6661
key: 'Expires',

ViewerRequest/queueitHelpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const CLOUDFRONT_SDK_VERSION ="1.2.2";
1+
const CLOUDFRONT_SDK_VERSION ="1.2.3";
22
const QueueIT = require("./sdk/queueit-knownuserv3-sdk.js");
33
exports.addKUPlatformVersion= function(redirectQueueUrl)
44
{

ViewerRequest/sdk/queueit-knownuserv3-sdk.js

Lines changed: 44 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)