forked from External/greenlight
Remove production check for hosts (#1549)
This commit is contained in:
parent
6104b3d713
commit
6b628d62d3
|
@ -47,9 +47,8 @@ class ApplicationController < ActionController::Base
|
|||
|
||||
# Block unknown hosts to mitigate host header injection attacks
|
||||
def block_unknown_hosts
|
||||
return unless Rails.env.production?
|
||||
return if config.hosts.blank?
|
||||
raise UnsafeHostError, "#{request.host} is not a safe host" unless config.hosts.include?(request.host)
|
||||
return if Rails.configuration.hosts.blank?
|
||||
raise UnsafeHostError, "#{request.host} is not a safe host" unless Rails.configuration.hosts.include?(request.host)
|
||||
end
|
||||
|
||||
# Force SSL
|
||||
|
|
Loading…
Reference in New Issue