Last active
December 23, 2015 20:37
-
-
Save x-cray/2752e1b406ca3bb86bfe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% macro hosts(environment, domain_prefix='') -%} | |
# {{ environment }} hosts | |
acl host_{{ environment }}:test-server hdr_dom(host) -i -m str {{ domain_prefix }}mesos-test.domain.com | |
{%- endmacro %} | |
{% macro bind(service, environment) -%} | |
use_backend cluster_{{ environment }}:{{ service }} if host_{{ environment }}:{{ service }} | |
{%- endmacro %} | |
frontend external_https_in | |
bind :443 ssl crt domain_com.pem | |
http-response set-header Strict-Transport-Security max-age=31536000;\ preload | |
http-response set-header X-Frame-Options DENY | |
http-response set-header X-Content-Type-Options nosniff | |
{{ hosts('staging', 'staging-') }} | |
{{ hosts('production') }} | |
# Staging bindings | |
{{ bind('test-server', 'staging') }} | |
# Production bindings | |
{{ bind('test-server', 'production') }} | |
frontend external_http_in | |
bind :80 | |
{{ hosts('staging', 'staging-') }} | |
{{ hosts('production') }} | |
# Staging bindings | |
{{ bind('test-server', 'staging') }} | |
# Production bindings | |
{{ bind('test-server', 'production') }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment