on 04-24-2006 5:26 PM
Hi all,
hopefully someone can help me here. Getting the client's IP-address from the http-request has been discussed here, however I have one specialty:
We are working with the SAP Web Dispatcher.!
Doing this the "request->get_header_field( '~remote_addr' )." returns always the IP-address of the Web-Dispatcher!
Anyone knows if there is a way to get the ip-address of the real "client" ??
Thanks in advance
Stefan Hester
Question was accidentally posted twice. Has been solved!
Message was edited by: Stefan Hester
Hello,
I have exactly tghe same issue and i bvere found the soltion.
Any tips forme ?
Thanks a have a ncie day.
Laurent
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
if anyone else is looking for a solution: Please add
AppendHeader xforwardedfor %{REMOTE_ADDR}
to your webdisp action file.
On the ABAP side you can access this field with
request->get_header_field('xforwardedfor')
On the java side you can access the client address with
IPortalComponentRequest request;
String clientAddress = request.getServletRequest().getHeader("xforwardedfor");
if (clientAddress == null || clientAddress.equals(""))
{
//direct connection
clientAddress = request.getServletRequest().getRemoteAddr();
}
Older version of webdisp where using a profile parameter: wdisp/add_xforwardedfor_header
(https://cw.sdn.sap.com/cw/docs/DOC-107640)
Best Regards,
Inga Andreasson
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.