Build Status

Entrace

A tiny middleware that determines whether this request was from the internal network or not.

Installation

gem install rack-entrance

Usage

Add it to your middleware stack

ENV['ENTRANCE_INTERNAL_IPS'] = "127.0.0.1,192.0.2.21"
use Rack::Entrance

Use it in your Controllers

request.env['entrance.internal']  #=> true/false