diff --git a/deploy/README.md b/deploy/README.md index bced0dc8f..da584ee5a 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -6,7 +6,7 @@ Use the following command to deploy a CloudFormation stack using the template in aws cloudformation deploy \ --template-file docs-website.yml \ --stack-name="${STACK_NAME}" \ - --capabilities CAPABILITY_IAM / + --capabilities CAPABILITY_IAM \ --no-execute-changeset \ --parameter-overrides \ AcmCertificateArn="${ACM_ARN}" \ diff --git a/deploy/docs-website.yml b/deploy/docs-website.yml index 6ca8752f1..7d4f32bd8 100644 --- a/deploy/docs-website.yml +++ b/deploy/docs-website.yml @@ -156,7 +156,7 @@ Resources: removeTrailingSlash: false, }; - const regexSuffixless = /\/[^/.]+$/; // e.g. "/some/page" but not "/", "/some/" or "/some.jpg" + const regexSuffixless = /\/[a-z0-9]+([0-9\.]+)?$/; // e.g. "/some/page" but not "/", "/some/" or "/some.jpg" const regexTrailingSlash = /.+\/$/; // e.g. "/some/" or "/some/page/" but not root "/" exports.handler = function handler(event, context, callback) { @@ -170,7 +170,7 @@ Resources: callback(null, request); return; } - + // Append "index.html" to origin request if (appendToDirs && uri.match(regexTrailingSlash)) { request.uri = uri + appendToDirs;