From 3693792e7653a5e9a4462a55f5d149a4570d18fb Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Mon, 17 Aug 2020 00:35:06 -0500 Subject: [Development] Disable allowlist and authorized fetch modes in development and test environments --- app/controllers/application_controller.rb | 4 ++-- app/helpers/domain_control_helper.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index cfc93b7ce..2b58e0b90 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -49,11 +49,11 @@ class ApplicationController < ActionController::Base end def authorized_fetch_mode? - true + !(Rails.env.development? || Rails.env.test?) end def public_fetch_mode? - false + !authorized_fetch_mode? end def store_current_location diff --git a/app/helpers/domain_control_helper.rb b/app/helpers/domain_control_helper.rb index 4ce205504..765ffa536 100644 --- a/app/helpers/domain_control_helper.rb +++ b/app/helpers/domain_control_helper.rb @@ -20,6 +20,6 @@ module DomainControlHelper end def whitelist_mode? - true + !(Rails.env.development? || Rails.env.test?) end end -- cgit