local?()
True if the request came from localhost, 127.0.0.1.
# File actionpack/lib/action_dispatch/http/request.rb, line 257 def local? LOCALHOST.any? { |local_ip| local_ip === remote_addr && local_ip === remote_ip } end