chore(deploy): Replaced edge.js with the latest index.js function code maintained in AWS lambda. index.js is edited to allow xml--fixes the sitemap.xml 404.
parent
9f601a53ad
commit
70213e7678
|
|
@ -84,11 +84,15 @@ exports.handler = (event, context, callback) => {
|
|||
'.txt': true,
|
||||
'.woff': true,
|
||||
'.woff2': true,
|
||||
'.xml': true,
|
||||
'.yaml': true,
|
||||
'.yml': true,
|
||||
'.zip': true,
|
||||
};
|
||||
|
||||
// Remove multiple slashes from path
|
||||
// permanentRedirect(/\/{2,}/.test(request.uri), request.uri.replace(/\/{2,}/, `/`));
|
||||
|
||||
// Remove index.html from path
|
||||
permanentRedirect(
|
||||
request.uri.endsWith('index.html'),
|
||||
|
|
@ -143,7 +147,7 @@ exports.handler = (event, context, callback) => {
|
|||
////////////// CLI InfluxQL link (catch before latest redirect) //////////////
|
||||
permanentRedirect(
|
||||
/\/influxdb\/latest\/query_language\/spec/.test(request.uri),
|
||||
request.uri.replace(/latest/, 'v1')
|
||||
request.uri.replace(/latest/, 'v1.8')
|
||||
);
|
||||
|
||||
////////////////////////// Latest version redirects //////////////////////////
|
||||
|
|
|
|||
Loading…
Reference in New Issue