Rack Middleware for websites that need to contain access to a group of ip addresses (a whitelist).
Outside these addresses, vistors are shown 403 Forbidden page.
The whitelist is maintained via environment-specific lists in a YAML configuration file.
in Gemfile
gem 'ip_whitelist', :git => 'git://github.com/nexiahome/ip_whitelist.git'
That’s it! (Railtie will auto-load this middleware code right after Rails::Logger)
Use 'rake middleware'
to see the load order
Be sure to set up your YAML file to list the whitelisted IPs. It must be at:
config/whitelist.yml
Otherwise it will not be loaded.
This middleware gem started from https://github.com/jake3030/rack-ip-whitelist but changed enough to warrant it’s own new name.