2019-02-01 14:22:04 +00:00
|
|
|
{{ test_url }} {
|
|
|
|
|
2020-05-19 19:26:04 +00:00
|
|
|
{% if test_acme %}
|
|
|
|
header / {
|
|
|
|
# Enable HTTP Strict Transport Security (HSTS) to force clients to always
|
|
|
|
# connect via HTTPS (do not use if only testing)
|
|
|
|
Strict-Transport-Security "max-age=31536000;"
|
|
|
|
# Enable cross-site filter (XSS) and tell browser to block detected attacks
|
|
|
|
X-XSS-Protection "1; mode=block"
|
|
|
|
# Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
|
|
|
|
X-Content-Type-Options "nosniff"
|
|
|
|
# Disallow the site to be rendered within a frame (clickjacking protection)
|
|
|
|
X-Frame-Options "DENY"
|
|
|
|
}
|
2019-02-01 14:22:04 +00:00
|
|
|
{% else %}
|
2020-05-19 19:26:04 +00:00
|
|
|
tls internal
|
2019-02-01 14:22:04 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2020-05-19 19:26:04 +00:00
|
|
|
log {
|
|
|
|
output file {{ caddy_logs }}/{{ test_name }}/vhost.log
|
2019-02-01 14:22:04 +00:00
|
|
|
}
|
|
|
|
|
2020-05-19 19:26:04 +00:00
|
|
|
root * {{ test_code }}
|
|
|
|
file_server
|
|
|
|
encode zstd gzip
|
2019-02-01 14:22:04 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
{% if test_www %}
|
|
|
|
www.{{ test_url }} {
|
|
|
|
|
|
|
|
redir https://{{ test_url }}
|
|
|
|
|
|
|
|
}
|
2020-04-03 09:46:27 +00:00
|
|
|
{% endif %}
|