Skip to content

Commit e40cd28

Browse files
committed
strip query from filename
fixes #7
1 parent c201136 commit e40cd28

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

middleware.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ module.exports = function(compiler, options) {
114114
if(url.indexOf(localPrefix) !== 0) return false;
115115
// get filename from request
116116
var filename = url.substr(localPrefix.length);
117+
if(filename.indexOf("?") >= 0) {
118+
filename = filename.substr(0, filename.indexOf("?"));
119+
}
117120
return pathJoin(compiler.outputPath, filename);
118121
}
119122

0 commit comments

Comments
 (0)