Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@biinari
Copy link
Contributor

@biinari biinari commented Aug 14, 2025

None seems to be replaced by an empty string by ansible. This can result in the Strict-Transport-Security header with a value like "max-age=1234; ; " or "max-age=1234; includeSubdomains; "

Follow the ansible playbook guide example for omitting items from a list using the special omit variable. This removes extra ; from the header.

None seems to be replaced by an empty string by ansible. This can result
in the Strict-Transport-Security header with a value like
"max-age=1234; ; " or "max-age=1234; includeSubdomains; "

Follow the ansible playbook guide example for omitting items from a list using
the special omit variable.
Copy link
Member

@swalkinshaw swalkinshaw left a comment

Choose a reason for hiding this comment

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

Verified this locally. Thanks 👍

│    TASK [Test with None] **********************************************************                                          │
 │    ok: [localhost] => {                                                                                                      │
 │        "msg": "add_header Strict-Transport-Security \"max-age=1234; ;\";"                                                    │
 │    }                                                                                                                         │
 │                                                                                                                              │
 │    TASK [Test with omit] **********************************************************                                          │
 │    ok: [localhost] => {                                                                                                      │
 │        "msg": "add_header Strict-Transport-Security \"max-age=1234\";"                                                       │
 │    }                                                                                                                         │

@swalkinshaw swalkinshaw merged commit d3f514a into roots:master Aug 15, 2025
2 checks passed
@biinari biinari deleted the fix_hsts_omit_parts branch August 19, 2025 11:42
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