Skip to content

[servers.http] Custom Response headers from HTTP server - #1195

Merged
manugarg merged 3 commits into
cloudprober:mainfrom
majiayu000:fix-890-custom-response-headers-from-h-0102-0851
Jan 11, 2026
Merged

manugarg merged 3 commits into
cloudprober:mainfrom
majiayu000:fix-890-custom-response-headers-from-h-0102-0851

Conversation

@majiayu000

Copy link
Copy Markdown
Contributor

Fixes #890

Changes

  • Add response_header map field to HTTP server proto config
  • Implement header injection in HTTP server handler
  • Add test for custom response headers functionality

Add response_header field to HTTP server configuration that allows
users to specify custom headers to be added to all HTTP responses.
This enables use cases like CORS headers, custom identification
headers, or any other HTTP headers needed by clients.

Signed-off-by: majiayu000 <[email protected]>
@manugarg manugarg changed the title fix: Custom Response headers from HTTP server [servers.http] Custom Response headers from HTTP server Jan 10, 2026

@manugarg manugarg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. One minor suggestion.

Comment thread internal/servers/http/http_test.go Resolved
@manugarg
manugarg merged commit afe4320 into cloudprober:main Jan 11, 2026
10 checks passed
@manugarg manugarg added this to the v0.14.2 milestone Jan 11, 2026
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.

Custom Response headers from HTTP server

2 participants