fix(redirect): allow other hosts when required
This commit is contained in:
parent
33a1e0f22d
commit
61ebb27e86
4 changed files with 4 additions and 4 deletions
|
@ -15,7 +15,7 @@ class AgentConnect::AgentController < ApplicationController
|
|||
cookies.encrypted[STATE_COOKIE_NAME] = state
|
||||
cookies.encrypted[NONCE_COOKIE_NAME] = nonce
|
||||
|
||||
redirect_to uri
|
||||
redirect_to uri, allow_other_host: true
|
||||
end
|
||||
|
||||
def callback
|
||||
|
|
|
@ -4,7 +4,7 @@ class FranceConnect::ParticulierController < ApplicationController
|
|||
|
||||
def login
|
||||
if FranceConnectService.enabled?
|
||||
redirect_to FranceConnectService.authorization_uri
|
||||
redirect_to FranceConnectService.authorization_uri, allow_other_host: true
|
||||
else
|
||||
redirect_to new_user_session_path
|
||||
end
|
||||
|
|
|
@ -36,7 +36,7 @@ class Users::SessionsController < Devise::SessionsController
|
|||
|
||||
case connected_with_france_connect
|
||||
when User.loged_in_with_france_connects.fetch(:particulier)
|
||||
redirect_to FRANCE_CONNECT[:particulier][:logout_endpoint]
|
||||
redirect_to FRANCE_CONNECT[:particulier][:logout_endpoint], allow_other_host: true
|
||||
return
|
||||
end
|
||||
end
|
||||
|
|
|
@ -44,7 +44,7 @@ describe Users::SessionsController, type: :controller do
|
|||
end
|
||||
|
||||
context 'when a previous path was registered' do
|
||||
let(:stored_path) { 'a_path' }
|
||||
let(:stored_path) { '/a_path' }
|
||||
|
||||
before { controller.store_location_for(:user, stored_path) }
|
||||
|
||||
|
|
Loading…
Reference in a new issue