Skip to content

Add support for custom headers#128

Merged
alex-clickhouse merged 1 commit intomainfrom
custom-headers
Dec 11, 2025
Merged

Add support for custom headers#128
alex-clickhouse merged 1 commit intomainfrom
custom-headers

Conversation

@alex-clickhouse
Copy link
Copy Markdown
Collaborator

No description provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 11, 2025

Codecov Report

❌ Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ClickHouse.Driver/ADO/ClickHouseClientSettings.cs 87.50% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for custom HTTP headers at the connection level in ClickHouse.Driver. Custom headers enable proxy authentication, distributed tracing, and other scenarios requiring additional HTTP headers in requests.

Key changes:

  • New CustomHeaders property in ClickHouseClientSettings for specifying custom headers
  • Security filtering to prevent overriding critical headers (Authorization, User-Agent, Connection)
  • Comprehensive test coverage for custom header application and blocked header validation

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
examples/Advanced_007_CustomHeaders.cs New example demonstrating proxy authentication headers usage
examples/Program.cs Integrated custom headers example into example runner
examples/README.md Added documentation entry for custom headers example
ClickHouse.Driver/ADO/ClickHouseClientSettings.cs Added CustomHeaders property with deep copy, equality, hash code, and string representation support
ClickHouse.Driver/ADO/ClickHouseConnection.cs Implemented header application logic with security filtering via IsBlockedHeader
ClickHouse.Driver/PublicAPI/PublicAPI.Unshipped.txt Tracked new public API surface for CustomHeaders property
ClickHouse.Driver.Tests/ADO/CustomHeadersTests.cs Added comprehensive tests for header application and blocking behavior
ClickHouse.Driver.Tests/ADO/ClickHouseClientSettingsTests.cs Extended settings tests to cover CustomHeaders property behavior
RELEASENOTES.md Documented new custom headers feature

Comment thread ClickHouse.Driver/ADO/ClickHouseClientSettings.cs
Comment thread ClickHouse.Driver/ADO/ClickHouseClientSettings.cs
Comment thread ClickHouse.Driver.Tests/ADO/ClickHouseClientSettingsTests.cs
@alex-clickhouse alex-clickhouse merged commit 532b94d into main Dec 11, 2025
16 checks passed
@alex-clickhouse alex-clickhouse deleted the custom-headers branch December 11, 2025 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants