gsamokovarov/web-console — pull request #12 by gsamokovarov (2013-07-29 11:19:14+00:00)
Title: Whitelist IPs support

A "must have" feature for the console, as it basically allows you to execute arbitrary code on the server machine. By default the only one whitelisted is the localhost.

To make configuration easier, I coerce every whitelisted ip to an instance of `IPAddr`. What this gives us is the support to easily whitelist whole networks. For example `config.web_console.whitelisted_ips = '10.0.0.0/8'` will whitelist the whole private network. Corporate environments can be pretty happy with this.

We can also whitelist multiple IP's and networks. `config.web_console.whitelisted_ips = %w( 127.0.0.1 10.0.0.0/8 )` will whitelist the localhost and the whole `10.0.0.0/8`. This also shows that I don't always include localhost by default and we may actually want to do that, so I will wait from an opinion of @guilleiguaran.