Project

General

Profile

Feature #1566

get ip address from client

Added by Sanneke Aleman about 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Start date:
03/24/2020
Due date:
% Done:

0%

Estimated time:
Browser (if web client):
chrome

Description

Is it possible to get the ip address of the client?
I have tried request.headers.connection.remoteAddress but that seems te be empty

History

#1

Updated by Patrick Talbot about 4 years ago

Try the new version 3.5.76 - I've added request.remoteAddress, request.remoteHost, request.remoteUser
They will be filled IF available.

remoteAddress might be the address of a proxy if you are using one, in which case you will need to examine the request.headers to check if the proxy exposes the remote address (via a X-FORWARD-FOR for example)

remoteHost in most case will be = remoteAddress (except if you configure the app server to use reverse DNS to try and resolve the remote IP to a host)

remoteUser will be null in most cases unless you are using BASIC authentication where the app server might expose the user (depends on the java app server and configuration)

#2

Updated by Patrick Talbot about 4 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF