README.md in firewall_constraint-0.0.2 vs README.md in firewall_constraint-0.0.4

- old
+ new

@@ -22,15 +22,23 @@ constraints FirewallConstraint::Constraint.new(['127.0.0.1']) do get 'dummy/blocked_by_dynamic' => 'dummy#blocked_by_dynamic' end + constraints FirewallConstraint::Constraint.new(Proc.new{['127.0.0.1']}) do + get 'dummy/blocked_by_proc' + end + ---- Uses a config file if ips not present in routes config/firewall_constraint.yml: test: - 10.0.0.0/8 ----- +---- + +You should be able to do DB-based whitelisting using the Proc whitelisting and an activerecord lookup or something similar to: + +constraints FirewallConstraint::Constraint.new(Proc.new{ValidIps.all.map{|x| x.ip}}) \ No newline at end of file