mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-05-12 15:56:16 +02:00
Add a hack to prevent redirect of requests for /static/js/pad to /static/js/pad.js.
This commit is contained in:
parent
16f1b53044
commit
af4bd5ca65
@ -35,9 +35,10 @@ var TAR_PATH = path.join(__dirname, 'tar.json');
|
||||
var tar = JSON.parse(fs.readFileSync(TAR_PATH, 'utf8'));
|
||||
|
||||
// Rewrite tar to include modules with no extensions and proper rooted paths.
|
||||
// HACK: Also use non-extension name so redirects are not encountered.
|
||||
exports.tar = {};
|
||||
for (var key in tar) {
|
||||
exports.tar['/' + key] =
|
||||
exports.tar['/' + key.replace(/\.js$/, '')] =
|
||||
tar[key].map(function (p) {return '/' + p}).concat(
|
||||
tar[key].map(function (p) {return '/' + p.replace(/\.js$/, '')})
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user