From e30e7e83d6bf8013637159ab482ad4267a1b050e Mon Sep 17 00:00:00 2001 From: Arlo Belshee Date: Fri, 29 Jul 2016 06:04:57 -0700 Subject: [PATCH] Add support for client to specify the error page for the created website. --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 79b132b..9754beb 100644 --- a/index.js +++ b/index.js @@ -114,6 +114,7 @@ module.exports = function(S) { _this.bucketName = populatedProject.custom.client.bucketName; _this.clientPath = path.join(_this.project.getRootPath(), 'client', 'dist'); + _this.errorPage = populatedProject.custom.client.errorPage || 'error.html'; return BbPromise.resolve(); } @@ -182,7 +183,7 @@ module.exports = function(S) { Bucket: _this.bucketName, WebsiteConfiguration: { IndexDocument: { Suffix: 'index.html' }, - ErrorDocument: { Key: 'error.html' } + ErrorDocument: { Key: _this.errorPage } } }; return _this.aws.request('S3', 'putBucketWebsite', params, _this.evt.options.stage, _this.evt.options.region)