mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
send the test files with the correct content-type header
This commit is contained in:
parent
951c93fa6d
commit
ca405c1685
1 changed files with 3 additions and 1 deletions
|
@ -17,7 +17,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
files = files.filter((f) => f.endsWith('.js'));
|
||||
|
||||
console.debug('Sent browser the following test specs:', files);
|
||||
res.setHeader('content-type', 'text/javascript');
|
||||
res.setHeader('content-type', 'application/javascript');
|
||||
res.end(`var specs_list = ${JSON.stringify(files)};\n`);
|
||||
});
|
||||
|
||||
|
@ -49,6 +49,8 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
|
||||
content = `describe(${JSON.stringify(specFileName)}, function(){ ${content} });`;
|
||||
|
||||
if(!specFilePath.endsWith('index.html')) res.setHeader('content-type', 'application/javascript');
|
||||
|
||||
res.send(content);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue