middleware options.

This commit is contained in:
Christopher Jeffrey
2013-12-04 06:31:08 -06:00
parent 5bfa17b0b9
commit a499fb4b16
+5 -1
View File
@@ -10,8 +10,12 @@ function term(options) {
term.middleware = function(options) {
var url = require('url');
options = options || {};
options.path = options.path || '/term.js';
return function(req, res, next) {
if (url.parse(req.url).pathname !== '/term.js') {
if (url.parse(req.url).pathname !== options.path) {
return next();
}