1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-22 05:19:22 +00:00

Can get remote IP address

This commit is contained in:
Pierre HUBERT 2020-03-25 08:57:46 +01:00
parent 7411855644
commit d6b5393fe4

View File

@ -31,6 +31,14 @@ export class RequestHandler {
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
*