How to determine the IP address that originate the request? My current code:
@Override
public Response serve(String uri, Method method,
Map<String, String> headers, Map<String, String> parms,
Map<String, String> files) {
headers.get("origin"); // my current workaround
};
But any client can modify or remove request headers. So, this is not a proper way to get that information.
In ASP.NET MVC3, this is can be achieved via Request.UserHostAddress
.