galaxy-caddy.reverse/templates/reverse.caddy.j2

41 lines
1.1 KiB
Text
Raw Normal View History

2019-02-01 15:11:31 +00:00
{{ vhost_url }} {
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"
}
proxy / http://{{ reverse_location }}:{{ reverse_port }} {
2019-02-17 16:45:02 +00:00
{% if rootws %}
websocket
{% endif %}
2019-02-01 15:11:31 +00:00
transparent
}
{% if websocket %}
2019-02-01 16:45:14 +00:00
proxy {{ websocket_path }} http://{{ websocket_location }}:{{ websocket_port }} {
websocket
}
{% endif %}
2019-07-01 20:15:44 +00:00
{% if proxy_rule %}
proxy {{ proxy_path }} http://{{ proxy_location }}:{{ proxy_port }} {
transparent
}
{% endif %}
2019-02-01 15:11:31 +00:00
log {{ caddy_logs }}/{{ vhost_name }}/access.log {
rotate_size 100
rotate_age 30
rotate_keep 10
}
}