caddy: add site.header and path.strip_prefix
Some checks failed
Publish collection to Galaxy / publish (push) Failing after 42s
Some checks failed
Publish collection to Galaxy / publish (push) Failing after 42s
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user