Domanda

Is it possible to read the clients ip address in an SAP BSP Application? We'd like to save the ip for a later moment.

The connection comes via a WebDispatcher in our DMZ to the SAP WAS.

Thanks, h.

È stato utile?

Soluzione

Here's a quick example how to do this; create a controller and implement the DO_REQUEST like this:

method do_request.
  data remote_ip type string.
  remote_ip = request->get_header_field( `~remote_addr` ).
  write( remote_ip ).
endmethod.

Edit: I could not test this with a web dispatcher though.

Altri suggerimenti

Ordinarily, that should be possible, but since you're behind a Web Dispatcher, I'd say you'll only ever see the IP of the Web Dispatcher. You'll probably have to implement some kind of logging there instead of inside the BSP application.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top