mirror of
				https://gitlab.com/comunic/comunicapiv2
				synced 2025-11-04 03:24:04 +00:00 
			
		
		
		
	Can get remote IP address
This commit is contained in:
		@@ -31,6 +31,14 @@ export class RequestHandler {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	public constructor(private req : Request, private response : Response) {}
 | 
						public constructor(private req : Request, private response : Response) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * Get remote IP address
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public get remoteIP() : string {
 | 
				
			||||||
 | 
							// TODO : check in production
 | 
				
			||||||
 | 
							return this.req.ip;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**
 | 
						/**
 | 
				
			||||||
	 * Get a parameter included in the post request
 | 
						 * Get a parameter included in the post request
 | 
				
			||||||
	 * 
 | 
						 * 
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user