rack-entrance 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rack/entrance.rb +3 -1
- data/lib/rack/entrance/version.rb +1 -1
- metadata +1 -1
data/lib/rack/entrance.rb
CHANGED
@@ -10,7 +10,9 @@ module Rack
|
|
10
10
|
def call(env)
|
11
11
|
request = Rack::Request.new(env)
|
12
12
|
ip = env["action_dispatch.remote_ip"] || request.ip
|
13
|
-
request.env['entrance.
|
13
|
+
request.env['entrance.ip'] = ip
|
14
|
+
request.env['entrance.internal_ips'] = internal_ips
|
15
|
+
request.env['entrance.internal'] = internal?(ip)
|
14
16
|
@app.call env
|
15
17
|
end
|
16
18
|
|