local?()
True if the request came from localhost, 127.0.0.1.
# File actionpack/lib/action_dispatch/http/request.rb, line 324 def local? LOCALHOST =~ remote_addr && LOCALHOST =~ remote_ip end