Commit fe9d2fe0 authored by Jarka Košanová's avatar Jarka Košanová

Merge branch '233551-remove-devise-unknown-formats-ff' into 'master'

Remove devise_redirect_unknown_formats feature flag

Closes #233551

See merge request gitlab-org/gitlab!38657
parents 4617680f f08b533d
......@@ -7,8 +7,6 @@ module Gitlab
# If the request format is not known, send a redirect instead of a 401
# response, since this is the outcome we're most likely to want
def http_auth?
return super unless Feature.enabled?(:devise_redirect_unknown_formats, default_enabled: true)
request_format && super
end
......
......@@ -190,20 +190,10 @@ RSpec.describe ApplicationController do
expect(response).to redirect_to new_user_session_path
end
context 'request format is unknown' do
it 'redirects if unauthenticated' do
get :index, format: 'unknown'
it 'redirects if unauthenticated and request format is unknown' do
get :index, format: 'unknown'
expect(response).to redirect_to new_user_session_path
end
it 'returns a 401 if the feature flag is disabled' do
stub_feature_flags(devise_redirect_unknown_formats: false)
get :index, format: 'unknown'
expect(response).to have_gitlab_http_status(:unauthorized)
end
expect(response).to redirect_to new_user_session_path
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment