Merge pull request #25 from cbarillet/master
Fix regexp to catch (un)subscribe addresses
This commit is contained in:
		
						commit
						96f60c972f
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		
							
								
								
									
										2
									
								
								index.js
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								index.js
									
										
									
									
									
								
							|  | @ -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]; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 John McLear
						John McLear