| 
				
			 | 
			
			
				@@ -39,11 +39,6 @@ app.use(cors(corsOptions)); 
			 | 
		
	
		
			
			| 
				39
			 | 
			
				39
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				40
			 | 
			
				40
			 | 
			
			
				 app.options('*', cors(corsOptions)); 
			 | 
		
	
		
			
			| 
				41
			 | 
			
				41
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				42
			 | 
			
				
			 | 
			
			
				-app.all('*', function(req, res, next) { 
			 | 
		
	
		
			
			| 
				43
			 | 
			
				
			 | 
			
			
				-    res.header('Access-Control-Allow-Headers', 'Content-Type') 
			 | 
		
	
		
			
			| 
				44
			 | 
			
				
			 | 
			
			
				-    next(); 
			 | 
		
	
		
			
			| 
				45
			 | 
			
				
			 | 
			
			
				-}); 
			 | 
		
	
		
			
			| 
				46
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				47
			 | 
			
				42
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				48
			 | 
			
				43
			 | 
			
			
				 // A request on /register generates a token and store it, along the user's 
			 | 
		
	
		
			
			| 
				49
			 | 
			
				44
			 | 
			
			
				 // address, on the tokens object 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -69,6 +64,9 @@ app.get('/register', function(req, res, next) { 
			 | 
		
	
		
			
			| 
				69
			 | 
			
				64
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				70
			 | 
			
				65
			 | 
			
			
				 // A request on /send with user input = mail to be sent 
			 | 
		
	
		
			
			| 
				71
			 | 
			
				66
			 | 
			
			
				 app.post('/send', function(req, res, next) { 
			 | 
		
	
		
			
			| 
				
			 | 
			
				67
			 | 
			
			
				+    // Response will be JSON 
			 | 
		
	
		
			
			| 
				
			 | 
			
				68
			 | 
			
			
				+    res.header('Access-Control-Allow-Headers', 'Content-Type'); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				69
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				72
			 | 
			
				70
			 | 
			
			
				     if(!checkBody(req.body)) { 
			 | 
		
	
		
			
			| 
				73
			 | 
			
				71
			 | 
			
			
				         return res.status(400).send(); 
			 | 
		
	
		
			
			| 
				74
			 | 
			
				72
			 | 
			
			
				     } 
			 |