From a1fde94378a6f19833ccef7a734cb223169bed1d Mon Sep 17 00:00:00 2001 From: f Date: Sat, 14 Aug 2021 19:18:47 -0300 Subject: [PATCH] Poder validar localmente los .local --- config/initializers/validates_hostname.rb | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 config/initializers/validates_hostname.rb diff --git a/config/initializers/validates_hostname.rb b/config/initializers/validates_hostname.rb new file mode 100644 index 0000000..43c47a6 --- /dev/null +++ b/config/initializers/validates_hostname.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +# Agrega el subdominio .local a menos que estemos en producción. +# +# TODO: Permitir TLDs que no sean de ICANN aquí. +PAK::ValidatesHostname::ALLOWED_TLDS << 'local' unless Rails.env.production?