static S getClientIPFromHeaders(SS headers) { //print("All headers: " + sfu(headers)); if (headers == null) null; S remoteAddr = cast headers.get("remote-addr"); S client = cast headers.get("x-forwarded-for"); if (nempty(client)) remoteAddr += "," + client; ret remoteAddr; }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1011962 |
Snippet name: | getClientIPFromHeaders (including forwarded-for) |
Eternal ID of this version: | #1011962/7 |
Text MD5: | 11dd98bac81325c6fdfb9b600c383f4f |
Author: | stefan |
Category: | eleu / javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-07 12:38:06 |
Source code size: | 294 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 511 / 587 |
Version history: | 6 change(s) |
Referenced in: | [show references] |