xdmp.getRequestClientAddress() as String?
Returns as a string the internet address of the client from which the HTTP server request is issued.
Returns the empty sequence if it is not called from an HTTP server.
The following example shows logic which checks if the request was submitted from the "localhost" IP address (127.0.0.1).
if (xdmp.getRequestClientAddress() == "127.0.0.1") { "Submitted from localhost."; } else { "Only localhost access is allowed for this application."; }
xdmp.getRequestClientAddress(); => "127.0.0.1"