Skip to main content

Module request_helper

Module request_helper 

Source
Expand description

Http request helper

Http请求辅助操作

Constants§

REMOTE_ADDR

Functions§

add_ip
Add ip to context
get_real_ip_from_ctx
Get real ip from context
mapped_ipv6_to_ipv4
Convert IPv4-mapped IPv6 to ipv4 e.g ::ffff:192.168.0.11 => 192.168.0.11
parse_forwarded_ip
Parse the Forwarded header to get the IP
sort_hashmap_query
Sort query and convert to lowercase
sort_query
Sort query string and convert to lowercase
try_get_real_ip_from_req
Try to get real ip from request
try_set_real_ip_from_req_to_ctx
Try to set real ip from request to context