Is it possible to get somehow the client IP-Address, when the user opens a User Dialog? For example the user is logged in and have the task list open, then opens one Task => start Method of an "User Dialog" gets called. And after this i would like to add an Script step (or anything else) to read the users client IP Address.

I already tried to find it somewhere in "ivy.session" or "ivy.request" without success.

Thanks.

asked 03.12.2018 at 11:59

fnuhs's gravatar image

fnuhs
(suspended)
accept rate: 0%


There is no safe way to get it, but basically you can interpret the request headers as described here: https://stackoverflow.com/questions/16558869/getting-ip-address-of-client

To get access to this API you just need to cast the the IRequest instance up:

IRequest request = Ivy.request();
if (request instanceof IHttpRequest)
{
  HttpServletRequest tomcatRequest = (IHttpRequest)Ivy.request()).getHttpServletRequest();
  // do header analysis...
}
link

answered 04.12.2018 at 02:54

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958
accept rate: 70%

edited 04.12.2018 at 03:37

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×147

Asked: 03.12.2018 at 11:59

Seen: 952 times

Last updated: 04.12.2018 at 03:37