Skip to content
Snippets Groups Projects
Commit f8cf28a2 authored by Zachary Carter's avatar Zachary Carter
Browse files

Forward /wsapi/fake_verification to browserid

parent a5dbf16a
No related branches found
No related tags found
No related merge requests found
...@@ -121,7 +121,19 @@ if (config.get('verifier_url')) { ...@@ -121,7 +121,19 @@ if (config.get('verifier_url')) {
// fake_verification.js. This is used during testing only and should // fake_verification.js. This is used during testing only and should
// never be included in a production deployment // never be included in a production deployment
if (process.env['BROWSERID_FAKE_VERIFICATION']) { if (process.env['BROWSERID_FAKE_VERIFICATION']) {
require('../lib/browserid/fake_verification.js').addVerificationWSAPI(app); app.use(function(req, res, next) {
if (url.parse(req.url).pathname == '/wsapi/fake_verification') {
forward(
browserid_url+req.url, req, res,
function(err) {
if (err) {
logger.error("error forwarding request:", err);
}
});
} else {
return next();
}
});
} }
// handle /wsapi reads/writes // handle /wsapi reads/writes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment