content_length

content_length() Instance Public methods Returns the content length of the request as an integer.

body

body() Instance Public methods The request body is an IO input stream. If the RAW_POST_DATA environment variable is already set, wrap it in a StringIO.

authorization

authorization() Instance Public methods Returns the authorization header regardless of whether it was specified directly or through one of the proxy alternatives.

POST

POST() Instance Public methods Override Rack's #POST method to support indifferent access request_parameters

GET

GET() Instance Public methods Override Rack's #GET method to support indifferent access query_parameters

new

new(env) Class Public methods

call

call(env) Instance Public methods Since the IP address may not be needed, we store the object here without calculating the IP to keep from slowing down the majority of requests. For those requests that do need to know the IP, the ActionDispatch::RemoteIp::GetIp#calculate_ip method will calculate the memoized client IP address.

new

new(app, check_ip_spoofing = true, custom_proxies = nil) Class Public methods Create a new RemoteIp middleware instance. The check_ip_spoofing option is on by default. When on, an exception is raised if it looks like the client is trying to lie about its own IP address. It makes sense to turn off this check on sites aimed at non-IP clients (like WAP devices), or behind proxies that set headers in an incorrect or confusing way (like AWS ELB). The custom_proxies argument can take a r

ips_from

ips_from(header) Instance Protected methods

filter_proxies

filter_proxies(ips) Instance Protected methods