Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Return middleware as root export

  • Loading branch information...
commit aca8912a385e2ed15b6a07ca0fb9b6f49090ec0f 1 parent 7619231
@kriszyp authored
Showing with 8 additions and 3 deletions.
  1. +3 −1 jsgi/head.js
  2. +2 −1  jsgi/pintura-headers.js
  3. +3 −1 jsgi/redirect.js
View
4 jsgi/head.js
@@ -1,6 +1,6 @@
var when = require("promised-io/promise").when;
-var Head = exports.Head = function(nextApp) {
+var Head = function(nextApp) {
return function(request) {
if(request.method === "HEAD") {
request.method = "GET"; // HEAD must act the same as GET
@@ -12,3 +12,5 @@ var Head = exports.Head = function(nextApp) {
return nextApp(request);
};
};
+Head.Head = Head;
+module.exports = Head;
View
3  jsgi/pintura-headers.js
@@ -16,4 +16,5 @@ function PinturaHeaders(serverName, nextApp){
});
};
}
-exports.PinturaHeaders = PinturaHeaders;
+PinturaHeaders.PinturaHeaders = PinturaHeaders;
+module.exports = PinturaHeaders;
View
4 jsgi/redirect.js
@@ -1,6 +1,6 @@
var uri = require("../util/url");
-exports.Redirect = function (path, status) {
+var Redirect = function (path, status) {
status = status || 301;
@@ -27,3 +27,5 @@ exports.Redirect = function (path, status) {
}
}
}
+Redirect.Redirect = Redirect;
+module.exports = Redirect;
Please sign in to comment.
Something went wrong with that request. Please try again.