Access to sessionContext from sandbox

Victor Smirnov victorvsmirnov at gmail.com
Thu Feb 21 03:07:32 EST 2019


Hi,
ref. https://github.com/genieacs/genieacs/pull/335.
it was a clumsy attempt to get the httpRequest.connection.remoteAddress
variable inside the sandbox.
So in a provisioning script one can have it like this:
let remoteip = getContext().httpRequest.connection.remoteAddress;
log ("INFO: Remote IP: " + remoteip);
remoteip variable can be used in the authentication scripts. In my case, I
don't know the CPEs serial numbers (don't really want to), but I know
customers' IP addresses so I can push personalized CPE parameters once I
know the remote IP.
Any other way to get that IP in the sandbox?

Victor Smirnov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20190221/8b4d9f04/attachment.html>


More information about the Users mailing list