Skip to content

Commit 84ac1e9

Browse files
author
James Prendergast
committed
tidying originrequest func
1 parent 55f4ada commit 84ac1e9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

edge-functions/src/originrequest.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const buckets = {
3+
const origins = {
44
a:'ab-test-a.s3.ap-southeast-2.amazonaws.com',
55
b:'ab-test-b.s3.ap-southeast-2.amazonaws.com'
66
};
@@ -33,12 +33,11 @@ exports.handler = (event, context, callback) => {
3333
targetPool = parsedCookies[cookieName];
3434
}
3535

36-
let s3Origin = buckets[targetPool];
36+
let s3Origin = origins[targetPool];
3737

3838
requestOrigin.region = 'ap-southeast-2';
3939
requestOrigin.domainName = s3Origin;
4040
headers['host'] = [{ key: 'host', value: s3Origin }];
41-
headers['Cookie'] = [{key: 'Cookie',value:'random=' + targetPool}];
4241

4342
console.log(JSON.stringify(request));
4443

0 commit comments

Comments
 (0)