From bb8791eac063febfee5d152d789bee15ea67b6f2 Mon Sep 17 00:00:00 2001 From: gkpty Date: Fri, 18 Sep 2020 12:31:37 -0500 Subject: [PATCH] added option in generate template if https to add redirect http to https --- lib/generateTemplate.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/generateTemplate.js b/lib/generateTemplate.js index b8b9d99..55f7466 100644 --- a/lib/generateTemplate.js +++ b/lib/generateTemplate.js @@ -54,6 +54,7 @@ module.exports = function genTemplate(domain, stack, config, template, records, "MinimumProtocolVersion" : "TLSv1.2_2018", "SslSupportMethod" : "sni-only" } + new_temp.Resources.CloudFrontDist.Properties.DistributionConfig.DefaultCacheBehavior["ViewerProtocolPolicy"] = "redirect-to-https" new_temp.Resources.CloudFrontDist.Properties.DistributionConfig["Aliases"] = [ domain, `www.${domain}`