Permalink
Browse files

Run compress connect handler before raw connect handlers.

  • Loading branch information...
Emily Stark
Emily Stark committed Feb 20, 2014
1 parent 6ca69af commit 9aa4e5398414fc3e1d522261f6d8f67bdae6e61a
Showing with 4 additions and 3 deletions.
  1. +4 −3 packages/webapp/webapp_server.js
@@ -247,6 +247,9 @@ var runWebAppServer = function () {
// webserver
var app = connect();
+ // Auto-compress any json, javascript, or text.
+ app.use(connect.compress());
+
// Packages and apps can add handlers that run before any other Meteor
// handlers via WebApp.rawConnectHandlers.
var rawConnectHandlers = connect();
@@ -274,13 +277,11 @@ var runWebAppServer = function () {
next();
}
});
+
// Parse the query string into res.query. Used by oauth_server, but it's
// generally pretty handy..
app.use(connect.query());
- // Auto-compress any json, javascript, or text.
- app.use(connect.compress());
-
var getItemPathname = function (itemUrl) {
return decodeURIComponent(url.parse(itemUrl).pathname);
};

0 comments on commit 9aa4e53

Please sign in to comment.