use http code (403) when registrar portal access is denied by ip whitelist, show client ip

This commit is contained in:
Georg Kahest 2017-09-27 18:16:38 +03:00
parent fcdef81412
commit 1493cb8700
2 changed files with 2 additions and 1 deletions

View file

@ -188,7 +188,7 @@ class Registrar
def check_ip def check_ip
return if Rails.env.development? return if Rails.env.development?
return if WhiteIp.registrar_ip_white?(request.ip) return if WhiteIp.registrar_ip_white?(request.ip)
render text: t('access_denied') and return render :denied, :layout => false, status: :forbidden, :locals => { :ip => request.ip } and return
end end
end end
end end

View file

@ -0,0 +1 @@
#{t('access_denied')} from #{ip}