allow localhost redirects with config value

fixes #144 
this should be `return host === 'localhost' || host === '127.0.0.1';