I'm trying to check callers to a method in Google Cloud Endpoint against a whitelist. How to get the remote address of a client? (And how to get the request object?)
UPDATE: Thanks to @ikerlasaga:
@ApiMethod(name = "echo")
public Message echo(HttpServletRequest req, Message message, @Named("n") @Nullable Integer n) {
String remote = req.getRemoteAddr();
return doEcho(message, n);
}