mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
Merge pull request #1271 from halfdan/1263-blacklist
Remove .txt from blacklist.
This commit is contained in:
commit
40c1271c08
2 changed files with 1 additions and 13 deletions
|
@ -4,7 +4,7 @@ var _ = require('underscore'),
|
|||
path = require('path');
|
||||
|
||||
function isBlackListedFileType(file) {
|
||||
var blackListedFileTypes = ['.hbs', '.md', '.txt', '.json'],
|
||||
var blackListedFileTypes = ['.hbs', '.md', '.json'],
|
||||
ext = path.extname(file);
|
||||
return _.contains(blackListedFileTypes, ext);
|
||||
}
|
||||
|
|
|
@ -42,18 +42,6 @@ describe('Middleware', function () {
|
|||
});
|
||||
});
|
||||
|
||||
it('should call next if txt file type', function (done) {
|
||||
var req = {
|
||||
url: 'LICENSE.txt'
|
||||
};
|
||||
|
||||
middleware.staticTheme(null)(req, null, function (a) {
|
||||
should.not.exist(a);
|
||||
middleware.forwardToExpressStatic.calledOnce.should.be.false;
|
||||
return done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should call next if json file type', function (done) {
|
||||
var req = {
|
||||
url: 'sample.json'
|
||||
|
|
Loading…
Add table
Reference in a new issue