Use "127.0.0.1" for development or test

Current version doesn't work in development or test because of multiple server environment.

This patch is just using "127.0.0.1" unless the env is production or staging.