Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KNOX-3113: Changed the default HSTS header for global config, skips c… #1008

Merged
merged 1 commit into from
Mar 27, 2025

Conversation

hanicz
Copy link
Contributor

@hanicz hanicz commented Mar 26, 2025

…opying the HSTS header if its already set

What changes were proposed in this pull request?

KNOX-3111 introduced a bug. If the global settings for HSTS is set and the topology wide setting is disabled the HSTS header is duplicated in case the proxied service also adds its own header. This PR adds verification to the response header copy method that checks whether this header is already set or not.

Also added includeSubDomains to the default global setting.

How was this patch tested?

New unit tests
Manually tests

Copy link
Contributor

@moresandeep moresandeep left a comment

Choose a reason for hiding this comment

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

looks good

@moresandeep moresandeep merged commit 21aaa2d into apache:master Mar 27, 2025
2 checks passed
moresandeep pushed a commit to moresandeep/knox that referenced this pull request Mar 31, 2025
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.

3 participants