File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1160,12 +1160,17 @@ FUNCTIONS
1160
1160
>: shared_key1 == shared_key2
1161
1161
true
1162
1162
1163
- GetRemoteAddr() → ip:uint32,port:uint16
1163
+ GetRemoteAddr()
1164
+ ├─→ ip:uint32,port:uint16
1165
+ └─→ nil
1164
1166
Returns client ip4 address and port, e.g. 0x01020304,31337 would
1165
1167
represent 1.2.3.4:31337. This is the same as GetClientAddr except
1166
- it will use the ip:port from the X-Forwarded-For header, only if
1167
- IsPrivateIp or IsLoopbackIp return true. When multiple addresses
1168
- are present in the header, the last/right-most address is used.
1168
+ it will use the ip:port from the X-Forwarded-For header when the
1169
+ IP returned by GetClientAddr is a trusted IP (returns true when
1170
+ checked against IsTrustedIp). When multiple addresses are present
1171
+ in the header, the last/right-most address is used.
1172
+ Returns `nil` if the address doesn't parse as IPv4 value (e.g.
1173
+ because it is misformatted or an IPv6 address).
1169
1174
1170
1175
GetResponseBody()
1171
1176
├─→ body:str
You can’t perform that action at this time.
0 commit comments