Sha256: 121ae225d06ae0dd1e1730322321566f2f8a4146effb1eb4024fca52c82a7dcf
Contents?: true
Size: 362 Bytes
Versions: 1
Compression:
Stored size: 362 Bytes
Contents
#Deny all, Allow only IPs described in config/custom/white_list_ip.yml white_list_ip_config_file='config/custom/white_list_ip.yml' WhiteListIPs=Regexp.new( "^("<< YAML.load_file(white_list_ip_config_file)["Allow"].collect{|ip| ip.downcase.include?("all") ? /.*/ : Regexp.escape(ip) }.join("|")<<")" ) rescue /^(127\.0\.0\.1|0\.0\.0\.0)/
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
picolena-0.1.1 | lib/picolena/templates/config/initializers/003_load_white_list_IPs.rb |