hotfix: update edge.js to address redirect bug

pull/3183/head
Scott Anderson 2021-09-28 16:21:51 -06:00
parent 8691340ff2
commit f9b504c28d
1 changed files with 2 additions and 1 deletions

View File

@ -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.