Skip to content

Commit

Permalink
Remove the Host header from HTTP output requests.
Browse files Browse the repository at this point in the history
Signed-off-by: David Venable <dlv@amazon.com>
  • Loading branch information
dlvenable committed Apr 3, 2024
1 parent 4375321 commit e4c2044
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/fluent/plugin/out_http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ def set_headers(req, uri, chunk)
end
end
req['Content-Type'] = @content_type
req['Host'] = uri.host
end

def set_auth(req, uri)
Expand Down
2 changes: 0 additions & 2 deletions test/plugin/test_out_http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@ def test_aws_sigv4_sts_role_arn
assert_equal 'application/x-ndjson', result.content_type
assert_equal test_events, result.data
assert_not_empty result.headers
assert_equal '127.0.0.1', result.headers['host']
assert_not_nil result.headers['authorization']
assert_match /AWS4-HMAC-SHA256 Credential=[a-zA-Z0-9]*\/\d+\/my-region-1\/someservice\/aws4_request/, result.headers['authorization']
assert_match /SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-security-token/, result.headers['authorization']
Expand Down Expand Up @@ -470,7 +469,6 @@ def test_aws_sigv4_no_role
assert_equal 'application/x-ndjson', result.content_type
assert_equal test_events, result.data
assert_not_empty result.headers
assert_equal '127.0.0.1', result.headers['host']
assert_not_nil result.headers['authorization']
assert_match /AWS4-HMAC-SHA256 Credential=[a-zA-Z0-9]*\/\d+\/my-region-1\/someservice\/aws4_request/, result.headers['authorization']
assert_match /SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-security-token/, result.headers['authorization']
Expand Down

0 comments on commit e4c2044

Please sign in to comment.