mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 08:43:37 +02:00
use http code (403) when registrar portal access is denied by ip whitelist, show client ip
This commit is contained in:
parent
fcdef81412
commit
1493cb8700
2 changed files with 2 additions and 1 deletions
|
@ -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
|
||||||
|
|
1
app/views/registrar/sessions/denied.haml
Normal file
1
app/views/registrar/sessions/denied.haml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
#{t('access_denied')} from #{ip}
|
Loading…
Add table
Add a link
Reference in a new issue