Commit cc0bc406 authored by Stan Hu's avatar Stan Hu

Merge branch '10io-fix-www-authenticate-header-in-packages-basic-auth-helpers' into 'master'

Fix typo in basic auth realm header name

See merge request gitlab-org/gitlab!49836
parents 6f5b2839 4b65a06a
---
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 ...@@ -7,8 +7,8 @@ module API
extend ::Gitlab::Utils::Override extend ::Gitlab::Utils::Override
module Constants module Constants
AUTHENTICATE_REALM_HEADER = 'Www-Authenticate: Basic realm' AUTHENTICATE_REALM_HEADER = 'WWW-Authenticate'
AUTHENTICATE_REALM_NAME = 'GitLab Packages Registry' AUTHENTICATE_REALM_NAME = 'Basic realm="GitLab Packages Registry"'
end end
include Constants include Constants
......
...@@ -12,7 +12,7 @@ RSpec.shared_examples 'rejects nuget packages access' do |user_type, status, add ...@@ -12,7 +12,7 @@ RSpec.shared_examples 'rejects nuget packages access' do |user_type, status, add
it 'has the correct response header' do it 'has the correct response header' do
subject 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 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