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:
parent
7411855644
commit
d6b5393fe4
@ -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
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user