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

fix: trim strict-transport-security header #1478

Merged

Conversation

LucasDemea
Copy link
Contributor

Fixes #1477.

@swalkinshaw swalkinshaw merged commit b6bf716 into roots:master Feb 22, 2023
@swalkinshaw
Copy link
Member

Thanks @LucasDemea

paulbrzeski pushed a commit to paulbrzeski/trellis that referenced this pull request Mar 3, 2023
@mariusmateoc
Copy link

Hi @swalkinshaw @LucasDemea,

If I didn't set hsts_include_subdomains: true I get invalid header strict-transport-security: max-age=31536000; ; (note double "; ;").

I don't know why reject('none') doesn't reject false/empty. I fix it with the following code:

add_header Strict-Transport-Security "max-age={{ [hsts_max_age, hsts_include_subdomains, hsts_preload] | reject('none') | reject('equalto','') | join('; ') | trim }}";

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.

Bug: latest curl version fails to retrieve urls on trellis managed hosts
3 participants