mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 11:22:41 +01: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
1 changed files with 2 additions and 1 deletions
|
@ -35,9 +35,10 @@ var TAR_PATH = path.join(__dirname, 'tar.json');
|
||||||
var tar = JSON.parse(fs.readFileSync(TAR_PATH, 'utf8'));
|
var tar = JSON.parse(fs.readFileSync(TAR_PATH, 'utf8'));
|
||||||
|
|
||||||
// Rewrite tar to include modules with no extensions and proper rooted paths.
|
// 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 = {};
|
exports.tar = {};
|
||||||
for (var key in 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}).concat(
|
||||||
tar[key].map(function (p) {return '/' + p.replace(/\.js$/, '')})
|
tar[key].map(function (p) {return '/' + p.replace(/\.js$/, '')})
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue