hotfix: updated edge.js
parent
3f1bf366c7
commit
5dece70a2a
|
@ -7,9 +7,9 @@ const latestVersions = {
|
|||
'influxdbv2': 'v2.0',
|
||||
'telegraf': 'v1.19',
|
||||
'chronograf': 'v1.9',
|
||||
'kapacitor': 'v1.6',
|
||||
'kapacitor': 'v1.5',
|
||||
'enterprise': 'v1.9',
|
||||
};
|
||||
};
|
||||
|
||||
const archiveDomain = 'https://archive.docs.influxdata.com';
|
||||
|
||||
|
@ -34,17 +34,17 @@ exports.handler = (event, context, callback) => {
|
|||
if (condition) {
|
||||
return callback(null, {
|
||||
status: '301',
|
||||
statusDescription: 'Moved Permanently',
|
||||
headers: {
|
||||
'location': [{
|
||||
key: 'Location',
|
||||
value: newUri,
|
||||
}],
|
||||
'cache-control': [{
|
||||
key: 'Cache-Control',
|
||||
value: "max-age=3600"
|
||||
}],
|
||||
},
|
||||
statusDescription: 'Moved Permanently',
|
||||
headers: {
|
||||
'location': [{
|
||||
key: 'Location',
|
||||
value: newUri,
|
||||
}],
|
||||
'cache-control': [{
|
||||
key: 'Cache-Control',
|
||||
value: "max-age=3600"
|
||||
}],
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -53,30 +53,30 @@ exports.handler = (event, context, callback) => {
|
|||
const parsedPath = path.parse(request.uri);
|
||||
const indexPath = 'index.html';
|
||||
const validExtensions = {
|
||||
'.html': true,
|
||||
'.css': true,
|
||||
'.js': true,
|
||||
'.xml': true,
|
||||
'.png': true,
|
||||
'.gif': true,
|
||||
'.jpg': true,
|
||||
'.ico': true,
|
||||
'.svg': true,
|
||||
'.csv': true,
|
||||
'.txt': true,
|
||||
'.lp': true,
|
||||
'.json': true,
|
||||
'.rb': true,
|
||||
'.eot': true,
|
||||
'.ttf': true,
|
||||
'.woff': true,
|
||||
'.otf': true,
|
||||
'.gz': true,
|
||||
'.tar': true,
|
||||
'.zip': true,
|
||||
'.md5': true,
|
||||
'.sha256': true,
|
||||
};
|
||||
'.html': true,
|
||||
'.css': true,
|
||||
'.js': true,
|
||||
'.xml': true,
|
||||
'.png': true,
|
||||
'.gif': true,
|
||||
'.jpg': true,
|
||||
'.ico': true,
|
||||
'.svg': true,
|
||||
'.csv': true,
|
||||
'.txt': true,
|
||||
'.lp': true,
|
||||
'.json': true,
|
||||
'.rb': true,
|
||||
'.eot': true,
|
||||
'.ttf': true,
|
||||
'.woff': true,
|
||||
'.otf': true,
|
||||
'.gz': true,
|
||||
'.tar': true,
|
||||
'.zip': true,
|
||||
'.md5': true,
|
||||
'.sha256': true,
|
||||
};
|
||||
|
||||
// Remove multiple slashes from path
|
||||
// permanantRedirect(/\/{2,}/.test(request.uri), request.uri.replace(/\/{2,}/, `/`));
|
||||
|
|
Loading…
Reference in New Issue