Skip to content

Commit 09b799e

Browse files
kennykkeetonian
authored andcommitted
docs: fix malformed response in cloudfront-http-redirect (#1096)
1 parent 491f1e4 commit 09b799e

File tree

1 file changed

+8
-11
lines changed
  • examples/apps/cloudfront-http-redirect

1 file changed

+8
-11
lines changed
Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
'use strict';
22

33
exports.handler = (event, context, callback) => {
4-
/*
5-
* Generate HTTP redirect response with 302 status code and Location header.
6-
*/
7-
const response = {
8-
status: '302',
9-
statusDescription: 'Found',
10-
headers: {
11-
location: [{
12-
key: 'Location',
13-
value: 'http://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html',
14-
}],
4+
5+
var response = {
6+
"statusCode": 302,
7+
"headers": {
8+
"Location": "http://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html"
159
},
10+
"body": "{}",
11+
"isBase64Encoded": false
1612
};
1713
callback(null, response);
1814
};
15+

0 commit comments

Comments
 (0)