From 490d166422b8ba378b7307668844366e4561a9f7 Mon Sep 17 00:00:00 2001
From: Lloyd Hilaiel <lloyd@hilaiel.com>
Date: Thu, 14 Jun 2012 14:43:16 +0300
Subject: [PATCH] verifier to support requests on both '/' (via hostname) and
 '/verify' (via url)

---
 bin/verifier | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/bin/verifier b/bin/verifier
index 8363e217d..d58415422 100755
--- a/bin/verifier
+++ b/bin/verifier
@@ -72,7 +72,7 @@ try {
   process.exit(1);
 }
 
-app.post('/verify', function(req, resp, next) {
+function doVerification(req, resp, next) {
   req.body = req.body || {}
 
   var assertion = (req.query && req.query.assertion) ? req.query.assertion : req. body.assertion;
@@ -124,7 +124,10 @@ app.post('/verify', function(req, resp, next) {
       });
     }
   });
-});
+};
+
+app.post('/verify', doVerification);
+app.post('/', doVerification);
 
 // shutdown nicely on signals
 shutdown.handleTerminationSignals(app, function() {
-- 
GitLab