Skip to content

Additional security headers - #3

Merged
ceco556 merged 7 commits into
security_headersfrom
map_security_headers
Jul 7, 2026
Merged

ceco556 merged 7 commits into
security_headersfrom
map_security_headers

Conversation

@AtanasNikov

Copy link
Copy Markdown
Collaborator

We are introducing a new --additional-http-headers flag that accepts a JSON object, allowing operators to configure arbitrary HTTP response headers. We chose JSON object because it correctly handles header values containing commas (for example, Cache-Control: no-cache, private), which wasn't working with go-flags' built-in delimiter parsing.

We are applying the AdditionalHTTPHeaders map after all existing header assignments in ServeHTTP, including the three currently hardcoded headers. This allows operators to override the currently default headers(X-Content-Type-Options, X-Download-Options, Cache-Control) if they explicitly choose to.
If --additional-http-headers is not specified, Concourse continues to behave exactly as it is and uses the existing default values.

Operators who want to use these or any other response headers can opt in by configuring --additional-http-headers, while everyone else continues to get the existing behavior unchanged.

@AtanasNikov
AtanasNikov requested a review from ceco556 July 7, 2026 12:15
@ceco556
ceco556 merged commit a981a69 into security_headers Jul 7, 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.

2 participants