diff --git a/terragrunt/modules/release-distribution/lambdas/static-router/index.js b/terragrunt/modules/release-distribution/lambdas/static-router/index.js index 6ab00123d..c8c158077 100644 --- a/terragrunt/modules/release-distribution/lambdas/static-router/index.js +++ b/terragrunt/modules/release-distribution/lambdas/static-router/index.js @@ -39,7 +39,9 @@ echo " curl https://sh.rustup.rs -sSf | sh" // them back through the doc site to take advantage of any helpful error // handling that may be defined there if (request.uri.startsWith('/doc/master')) { - return redirect('//doc.rust-lang.org/stable' + request.uri.slice(11), callback); + // The slice method is used to remove the '/doc/master' prefix from the + // URI. 11 is the length of '/doc/master'. + return redirect('https://doc.rust-lang.org/stable' + request.uri.slice(11), callback); } callback(null, request);