From 0f352cab24d23f9c661f8182a3fb08e1287d179d Mon Sep 17 00:00:00 2001 From: Georg Date: Tue, 17 Oct 2017 13:24:27 +0300 Subject: [PATCH] Access denied forbidden status brakes IE and pingdom monitoring (#617) *Access denied page forbidden status brakes IE and pingdom monitoring, removing it. --- app/controllers/registrar/sessions_controller.rb | 2 +- spec/requests/registrar/ip_restriction_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/registrar/sessions_controller.rb b/app/controllers/registrar/sessions_controller.rb index 8f9c71b1b..4ba6501f1 100644 --- a/app/controllers/registrar/sessions_controller.rb +++ b/app/controllers/registrar/sessions_controller.rb @@ -155,7 +155,7 @@ class Registrar return if allowed - render text: t('registrar.authorization.ip_not_allowed', ip: request.ip), status: :forbidden + render text: t('registrar.authorization.ip_not_allowed', ip: request.ip) end end end diff --git a/spec/requests/registrar/ip_restriction_spec.rb b/spec/requests/registrar/ip_restriction_spec.rb index bcde36b02..3effb72a6 100644 --- a/spec/requests/registrar/ip_restriction_spec.rb +++ b/spec/requests/registrar/ip_restriction_spec.rb @@ -71,7 +71,7 @@ RSpec.describe 'Registrar area IP restriction', settings: false do context 'when ip is not allowed' do specify do get registrar_login_path - expect(response).to be_forbidden + expect(response.body).to match "Access denied" end end end