Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

Commit

Permalink
lib: fix templating being overzealous
Browse files Browse the repository at this point in the history
It was not really restricted to HTML files.
  • Loading branch information
vincentbernat committed Aug 8, 2015
1 parent 9198695 commit 5806f73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = function(base, substitutions) {
return function(req, res, next) {
// Handle only GET/HEAD files
if ((req.method !== 'GET' && req.method !== 'HEAD') ||
req.path.slice(1) in (onlyFor || []) === -1) {
(onlyFor || []).indexOf(req.path.slice(1)) === -1) {
return next();
}
var write = res.write;
Expand Down

0 comments on commit 5806f73

Please sign in to comment.