Fix regexp to catch (un)subscribe addresses

This commit is contained in:
Cyril Barillet 2015-06-02 08:07:15 +02:00
parent 2bbf245d83
commit f2194aab20

View file

@ -8,7 +8,7 @@ db['dbSettings'].cache = 0;
exports.registerRoute = function (hook_name, args, callback) { exports.registerRoute = function (hook_name, args, callback) {
// Catching (un)subscribe addresses // Catching (un)subscribe addresses
args.app.get(/\/p/*/(un){0,1}subscribe=\/(.*)/, function(req, res) { args.app.get(/\/p\/.*\/(un){0,1}subscribe=(.*)/, function(req, res) {
var fullURL = req.protocol + "://" + req.get('host') + req.url; var fullURL = req.protocol + "://" + req.get('host') + req.url;
var path=req.url.split("/"); var path=req.url.split("/");
var padId=path[2]; var padId=path[2];