Skip to content

Commit bc6c280

Browse files
alexprice1SpaceK33z
authored andcommitted
Only use middleware for GET requests (#96)
1 parent 92a9eae commit bc6c280

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

middleware.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ module.exports = function(compiler, options) {
194194

195195
// The middleware function
196196
function webpackDevMiddleware(req, res, next) {
197+
if(req.method !== 'GET') {
198+
return next();
199+
}
200+
197201
var filename = getFilenameFromUrl(req.url);
198202
if(filename === false) return next();
199203

0 commit comments

Comments
 (0)