Private
Public Access
2
0

caddy: add site.header and path.strip_prefix
Some checks failed
Publish collection to Galaxy / publish (push) Failing after 42s

This commit is contained in:
2026-03-11 15:40:38 +03:00
parent aa7ef1a41e
commit f03a3c03b8
3 changed files with 12 additions and 7 deletions

View File

@@ -118,7 +118,7 @@
encode gzip zstd
{% for path in site.paths %}
handle {{ path.path | default('*') }} {
handle{% if path.strip_prefix | default(false) %}_path{% endif %} {{ path.path | default('*') }} {
reverse_proxy {
to {{ path.addrs | join(' ') }}
header_up X-Real-IP {remote}
@@ -273,6 +273,7 @@
}
{% endif %}
{% if site.header | default(caddy_sites_defaults.header) %}
header {
Content-Security-Policy "{{ caddy_sites_defaults.header_content_security_policy | combine(site.header_content_security_policy | default({})) | dict2str(sep1=' ', sep2='; ', sep3=';') }}"
Cross-Origin-Embedder-Policy "{{ site.header_cross_origin_embedder_policy | default(caddy_sites_defaults.header_cross_origin_embedder_policy) }}"
@@ -294,6 +295,7 @@
{{ header.name }} "{{ header.value }}"
{% endfor %}
}
{% endif %}
handle_errors 403 {
header X-Blocked "true"