From 7bdec9b5fa7779c1914771526625f256bf454d85 Mon Sep 17 00:00:00 2001 From: evazion Date: Thu, 11 Mar 2021 02:57:08 -0600 Subject: [PATCH] config: whitelist ngrok.io for development. Add ngrok.io (plus a few more domains) to the hostname whitelist so that it can be used as a hostname in development. Useful for testing webhooks. * https://ngrok.com --- config/environments/development.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/environments/development.rb b/config/environments/development.rb index e80d22833..0dc1d03c6 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -66,4 +66,8 @@ Rails.application.configure do BetterErrors::Middleware.allow_ip!(IPAddr.new("0.0.0.0/0")) BetterErrors::Middleware.allow_ip!(IPAddr.new("::/0")) + + # https://bigbinary.com/blog/rails-6-adds-guard-against-dns-rebinding-attacks + # hxxps://github.com/rails/rails/pull/33145 + config.hosts += [".ngrok.io", ".lvh.me", ".xip.io", ".nip.io"] end