(req: $Request)
| 332 | } |
| 333 | |
| 334 | function getRequestIPAddress(req: $Request) { |
| 335 | const { proxy } = getAppURLFactsFromRequestURL(req.originalUrl); |
| 336 | let ipAddress; |
| 337 | if (proxy === 'none') { |
| 338 | ipAddress = req.socket.remoteAddress; |
| 339 | } else if (proxy === 'apache' || proxy === 'aws') { |
| 340 | ipAddress = req.get('X-Forwarded-For'); |
| 341 | } |
| 342 | invariant(ipAddress, 'could not determine requesting IP address'); |
| 343 | return ipAddress; |
| 344 | } |
| 345 | |
| 346 | function getSessionParameterInfoFromRequestBody( |
| 347 | req: $Request, |
no test coverage detected