Skip to content

Commit

Permalink
Increase the HPKP seconds to 604800 (7 days)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstufft committed Jan 14, 2015
1 parent 107aeac commit eaec1b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion salt/haproxy/config/haproxy.cfg.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ backend {{ service }}

{% if config.get("hpkp", True) and pillar["tls"].get("pins") -%}
# Add HPKP headers for anything that is configured to have them.
http-response set-header Public-Key-Pins max-age={{ config.get("hpkp_seconds", 86400) }};\ {% if config.get("hpkp_subdomains", True) %}includeSubDomains;\ {% endif %}{% for pin in pillar["tls"]["pins"] %}pin-sha256="{{ pin }}";\ {% endfor %}
http-response set-header Public-Key-Pins max-age={{ config.get("hpkp_seconds", 604800) }};\ {% if config.get("hpkp_subdomains", True) %}includeSubDomains;\ {% endif %}{% for pin in pillar["tls"]["pins"] %}pin-sha256="{{ pin }}";\ {% endfor %}
{%- endif %}

{% for item in config.get("extra", []) -%}
Expand Down
2 changes: 1 addition & 1 deletion salt/haproxy/config/nginx-redirect.conf.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ server {

{% if config.get("hpkp", True) and pillar["tls"].get("pins") -%}
# Add HPKP headers for anything that is configured to have them.
add_header Public-Key-Pins 'max-age={{ config.get("hpkp_seconds", 86400) }}; {% if config.get("hpkp_subdomains", True) %}includeSubDomains; {% endif %}{% for pin in pillar["tls"]["pins"] %}pin-sha256="{{ pin }}"; {% endfor %}';
add_header Public-Key-Pins 'max-age={{ config.get("hpkp_seconds", 604800) }}; {% if config.get("hpkp_subdomains", True) %}includeSubDomains; {% endif %}{% for pin in pillar["tls"]["pins"] %}pin-sha256="{{ pin }}"; {% endfor %}';
{%- endif %}

return 301 http{% if config.get("tls", True) %}s{% endif %}://{{ config.target }}$request_uri;
Expand Down

0 comments on commit eaec1b8

Please sign in to comment.