Skip to content

Commit

Permalink
properly fixup jobs.pyfound.org via SNI support
Browse files Browse the repository at this point in the history
  • Loading branch information
ewdurbin committed Aug 30, 2023
1 parent 3cc4a41 commit 557c13b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pillar/base/haproxy.sls
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ haproxy:
jobs:
domains:
- jobs.pyfound.org
check: False
check: "GET / HTTP/1.1\\r\\nHost:\\ pythonsoftwarefoundation.applytojob.com"
ca-file: "ca-certificates.crt"
verify_host: pythonsoftwarefoundation.applytojob.com
sni: pythonsoftwarefoundation.applytojob.com
extra:
- http-request replace-header Host ^.*$ pythonsoftwarefoundation.applytojob.com

Expand Down
2 changes: 1 addition & 1 deletion salt/haproxy/config/haproxy.cfg.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ backend {{ service }}
{% endfor -%}

{{ "{{" }}range service "{{ service }}@{{ pillar.dc }}" "any"}}
{% raw %}server {{.Node}} {{.Address}}:{{.Port}}{% endraw %}{% if config.get("check", True) %} check{% endif %}{% if config.get("tls", True) %} ssl force-tlsv12 verifyhost {{ config.get("verify_host", service + ".psf.io") }} ca-file {{ config.get("ca-file", "PSF_CA.pem") }}{% endif %}{{ "{{end}}" }}
{% raw %}server {{.Node}} {{.Address}}:{{.Port}}{% endraw %}{% if config.get("check", True) %} check{% if config.get("sni", False)%} check-sni {{ config.get("sni") }}{% endif %}{% if config.get("sni", False)%} sni str({{ config.get("sni") }}){% endif %}{% endif %}{% if config.get("tls", True) %} ssl force-tlsv12 verifyhost {{ config.get("verify_host", service + ".psf.io") }} ca-file {{ config.get("ca-file", "PSF_CA.pem") }}{% endif %}{{ "{{end}}" }}

{% endfor %}

Expand Down

0 comments on commit 557c13b

Please sign in to comment.