File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ package:
147
147
148
148
provider:
149
149
name: aws
150
- runtime: nodejs6.10 # Because this runs on CloudFront (lambda@edge) it must be 6.10
150
+ runtime: nodejs6.10 # Because this runs on CloudFront (lambda@edge) it must be 6.10 or greater
151
151
region: ${self:custom.region}
152
152
stage: ${self:custom.stage}
153
153
# Note that Lambda@Edge does not actually support environment variables for lambda
@@ -216,8 +216,10 @@ module.exports = {
216
216
var req = evt.Records[0].cf.request;
217
217
218
218
if (req.uri && req.uri.length && req.uri.substring(req.uri.length - 1) === '/') {
219
- console.log('changing "%s" to "%s"', req.uri, req.uri + 'index.html');
220
- req.uri = req.uri + 'index.html';
219
+ var uri = req.uri + 'index.html';
220
+
221
+ console.log('changing "%s" to "%s"', req.uri, uri);
222
+ req.uri = uri;
221
223
}
222
224
223
225
cb(null, req);
You can’t perform that action at this time.
0 commit comments