Merge pull request #25 from cbarillet/master

Fix regexp to catch (un)subscribe addresses
This commit is contained in:
John McLear 2015-06-02 12:00:20 +01:00
commit 96f60c972f

View file

@ -8,7 +8,7 @@ db['dbSettings'].cache = 0;
exports.registerRoute = function (hook_name, args, callback) {
// 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 path=req.url.split("/");
var padId=path[2];