Skip to content

Commit

Permalink
Avoid using deprecated Rack::Response#header
Browse files Browse the repository at this point in the history
Will be removed with Rack 3.1.
  • Loading branch information
dentarg committed Jan 10, 2024
1 parent db79236 commit 393bb7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rack-protection/spec/lib/rack/protection/xss_header_spec.rb
Expand Up @@ -31,11 +31,11 @@
end

it 'should set the X-Content-Type-Options' do
expect(get('/', {}, 'wants' => 'text/html').header['X-Content-Type-Options']).to eq('nosniff')
expect(get('/', {}, 'wants' => 'text/html').headers['X-Content-Type-Options']).to eq('nosniff')
end

it 'should set the X-Content-Type-Options for other content types' do
expect(get('/', {}, 'wants' => 'application/foo').header['X-Content-Type-Options']).to eq('nosniff')
expect(get('/', {}, 'wants' => 'application/foo').headers['X-Content-Type-Options']).to eq('nosniff')
end

it 'should allow changing the nosniff-mode off' do
Expand Down

0 comments on commit 393bb7c

Please sign in to comment.