Class: Rack::Attack::Request
- Inherits:
-
Request
- Object
- Request
- Rack::Attack::Request
- Defined in:
- lib/neeto_commons_backend/initializers/rack_attack.rb
Instance Method Summary collapse
Instance Method Details
#remote_ip ⇒ Object
7 8 9 10 11 12 |
# File 'lib/neeto_commons_backend/initializers/rack_attack.rb', line 7 def remote_ip # Cloudflare stores remote IP in CF_CONNECTING_IP header @_remote_ip ||= (env["HTTP_CF_CONNECTING_IP"] || env["action_dispatch.remote_ip"] || ip).to_s end |