From f9b504c28da54b6fea28ea58063f18e0daff76b4 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Tue, 28 Sep 2021 16:21:51 -0600 Subject: [PATCH] hotfix: update edge.js to address redirect bug --- deploy/edge.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/edge.js b/deploy/edge.js index 81056f52f..099f5f1ce 100644 --- a/deploy/edge.js +++ b/deploy/edge.js @@ -13,6 +13,7 @@ const latestVersions = { }; const archiveDomain = 'https://archive.docs.influxdata.com'; +const docsDomain = 'https://docs.influxdata.com'; exports.handler = (event, context, callback) => { @@ -173,7 +174,7 @@ exports.handler = (event, context, callback) => { /////////////////////// END PRODUCT-SPECIFIC REDIRECTS /////////////////////// // Redirect to the a trailing slash - permanentRedirect(!request.uri.endsWith('/'), request.uri + '/'); + permanentRedirect(!request.uri.endsWith('/'), `${docsDomain}${request.uri}/`); // Use index.html if the path doesn't have an extension // or if the version number is parsed as an extension.