diff --git a/lib/web-server.js b/lib/web-server.js index 1f5a7e5de..0588536fd 100644 --- a/lib/web-server.js +++ b/lib/web-server.js @@ -36,7 +36,15 @@ var createWebServer = function(injector) { filesPromise: ['value', filesPromise] }]); + // TODO(vojta): remove if https://github.com/senchalabs/connect/pull/850 gets merged + var compressOptions = { + filter: function(req, res){ + return (/json|text|javascript|dart/).test(res.getHeader('Content-Type')); + } + }; + var handler = connect() + .use(connect.compress(compressOptions)) .use(injector.invoke(karmaMiddleware.create)) .use(injector.invoke(sourceFilesMiddleware.create)) // TODO(vojta): extract the proxy into a plugin