Updated checks for localhost to extend to RFC1918 too

Currently, you only check for localhost usage.

It may well be people are running in a console-only VM or on a server, in which case, allowing requests from RFC1918 or reserved subnets would be desirable.

The goal of this patch is to allow this to happen for app_dev.php and config.php.