algernon icon indicating copy to clipboard operation
algernon copied to clipboard

How to get RemoteAddr (or other [remote] variables)?

Open terminar opened this issue 3 years ago • 2 comments

Hi, kudos for the work on Algernon, it's getting to be a small swiss army knife for me doing some quick and dirty test stuff.

i wanted to get the remote ip address but i can't find any field, table, function which returns such information. As example, compared to PHP it would be $_SERVER["REMOTE_ADDR"] (https://www.php.net/manual/de/reserved.variables.server.php).

Bye Björn

terminar avatar Jul 10 '22 10:07 terminar

Hi Björn,

Thanks for the feature request! I agree that this is a good idea.

Cheers, Alexander

xyproto avatar Jul 10 '22 18:07 xyproto

@terminar it's probably pretty easy to set up a PR if you want. Basically copy this function and pull out req.RemoteAddr or whatnot.

tooolbox avatar Jul 11 '22 23:07 tooolbox