Commit f08b533d authored by Nick Thomas's avatar Nick Thomas

Revert "Add a feature flag for redirecting unknown-format requests"

This reverts commit c6ed8073.
parent a0942103
......@@ -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