Skip to content

Simple IP Whitelisting middleware for Rack servers

Notifications You must be signed in to change notification settings

nexiahome-orig/ip_whitelist

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IP Whitelist Middleware

About

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.

Usage

Rails 3

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

YAML File

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.

Kudos

This middleware gem started from https://github.com/jake3030/rack-ip-whitelist but changed enough to warrant it’s own new name.

About

Simple IP Whitelisting middleware for Rack servers

Resources

Stars

Watchers

Forks

Packages

No packages published