Commit 4b65a06a authored by David Fernandez's avatar David Fernandez Committed by Stan Hu

Fix typo in basic auth realm header name

parent bb8a6477
---
title: Fix the header name for basic auth authentication in package managers APIs
merge_request: 49836
author:
type: fixed
......@@ -7,8 +7,8 @@ module API
extend ::Gitlab::Utils::Override
module Constants
AUTHENTICATE_REALM_HEADER = 'Www-Authenticate: Basic realm'
AUTHENTICATE_REALM_NAME = 'GitLab Packages Registry'
AUTHENTICATE_REALM_HEADER = 'WWW-Authenticate'
AUTHENTICATE_REALM_NAME = 'Basic realm="GitLab Packages Registry"'
end
include Constants
......
......@@ -12,7 +12,7 @@ RSpec.shared_examples 'rejects nuget packages access' do |user_type, status, add
it 'has the correct response header' do
subject
expect(response.headers['Www-Authenticate: Basic realm']).to eq 'GitLab Packages Registry'
expect(response.headers['WWW-Authenticate']).to eq 'Basic realm="GitLab Packages Registry"'
end
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