Advertisement
Guest User

Untitled

a guest
Nov 13th, 2012
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.27 KB | None | 0 0
  1. module Rack
  2.   class Request
  3.     def ip
  4.       @ip ||= (@env['HTTP_CF_CONNECTING_IP'] || super)
  5.     end
  6.   end
  7. end
  8.  
  9.  
  10. module Rack
  11.   class Request
  12.     class << self
  13.       def ip
  14.         @ip ||= (@env['HTTP_CF_CONNECTING_IP'] || super)
  15.       end
  16.     end
  17.   end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement