Skip to content

Conversation

@anonymoususer72041
Copy link
Contributor

Summary

This PR adds a small set of conservative, low-risk HTTP security headers to the default Apache .htaccess to improve baseline hardening for public OpenCATS installations.

To avoid breaking setups where the Career Portal is embedded into an external website, the clickjacking protection (X-Frame-Options: SAMEORIGIN) is applied globally but explicitly unset for /careers/ (and all subpaths) via a dedicated careers/.htaccess.

Motivation

OpenCATS currently ships without a baseline set of HTTP security headers. Adding these defaults provides immediate, broadly compatible security improvements for typical deployments without requiring server-specific configuration.

The chosen headers are intentionally conservative to minimize the risk of breaking existing installations or customizations, while still providing meaningful protection (e.g. against MIME sniffing, clickjacking, and unnecessary referrer leakage).

@anonymoususer72041 anonymoususer72041 force-pushed the security/headers-defaults branch from 291a167 to ae12963 Compare January 5, 2026 15:48
* Switch the global `.htaccess` header directives to `Header always set` so the security headers are emitted reliably for redirects and error responses as well
* Use `Header always unset` in the `careers/.htaccess` to ensure the `X-Frame-Options` override continues to work when the global header is always set
@anonymoususer72041 anonymoususer72041 changed the title Security: Add baseline security headers security: add baseline security headers Jan 27, 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.

1 participant