From 06ea28648b0d88250ecd2aa49d95c00aa9fac5ec Mon Sep 17 00:00:00 2001 From: nain <126972030+nain-F49FF806@users.noreply.github.com> Date: Thu, 10 Oct 2024 10:05:27 +0000 Subject: [PATCH] re add accidentally dropped leading / in versioned docs regex pattern --- .../modules/release-distribution/lambdas/doc-router/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terragrunt/modules/release-distribution/lambdas/doc-router/index.js b/terragrunt/modules/release-distribution/lambdas/doc-router/index.js index 722fd538a..4b67701a8 100644 --- a/terragrunt/modules/release-distribution/lambdas/doc-router/index.js +++ b/terragrunt/modules/release-distribution/lambdas/doc-router/index.js @@ -67,11 +67,11 @@ exports.handler = (event, context, callback) => { } // Forward patch versioned documentation as-is. - if (/^(\d+)\.(\d+).(\d+)\/(.*)/.test(request.uri)) { + if (/^\/(\d+)\.(\d+).(\d+)\/(.*)/.test(request.uri)) { return callback(null, request); } // Include patch version 0 if minor versioned documentation is requested - const minor_versioned_pattern = /^\/?(\d+)\.(\d+)\/(.*)/ + const minor_versioned_pattern = /^\/(\d+)\.(\d+)\/(.*)/ if (minor_versioned_pattern.test(request.uri)) { const patched_uri = request.uri.replace(minor_versioned_pattern, "/$1.$2.0/$3"); return temp_redirect(patched_uri, callback);