We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 491f1e4 commit 09b799eCopy full SHA for 09b799e
examples/apps/cloudfront-http-redirect/index.js
@@ -1,18 +1,15 @@
1
'use strict';
2
3
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
- }],
+
+ var response = {
+ "statusCode": 302,
+ "headers": {
+ "Location": "http://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html"
15
},
+ "body": "{}",
+ "isBase64Encoded": false
16
};
17
callback(null, response);
18
0 commit comments