caddy: add site.no_upsream_host
Some checks failed
Publish collection to Galaxy / publish (push) Has been cancelled
Some checks failed
Publish collection to Galaxy / publish (push) Has been cancelled
This commit is contained in:
@@ -114,6 +114,7 @@ caddy_coraza_crs_plugins:
|
||||
caddy_sites: []
|
||||
# - id: "" # Mandatory: short id for the site (for site specific directories and files)
|
||||
# name: "" # Mandatory: canonical domain name
|
||||
# no_upstream_host: false # Optionnal: Host header hostport, not upstream_hostport, default false
|
||||
# paths: # Mandatory: targets for the reverse proxy
|
||||
# - path: "*" # Optionnal: path of the request, default "*"
|
||||
# strip_prefix: false # Optionnal: default "false"
|
||||
|
||||
@@ -152,6 +152,11 @@
|
||||
reverse_proxy {
|
||||
to {{ path.addrs | join(' ') }}
|
||||
header_up X-Real-IP {remote}
|
||||
{% if site.no_upstream_host | default(caddy_sites_defaults.site_no_upstream_host) %}
|
||||
header_up Host {hostport}
|
||||
{% else %}
|
||||
header_up Host {upstream_hostport}
|
||||
{% endif %}
|
||||
lb_policy {{ site.proxy_lb_policy | default(caddy_sites_defaults.proxy_lb_policy) }}
|
||||
|
||||
{% if site.proxy_active_checks | default(caddy_sites_defaults.proxy_active_checks) %}
|
||||
|
||||
@@ -4,6 +4,7 @@ caddy_global_sites_defaults:
|
||||
# Site aliases
|
||||
site_aliases: []
|
||||
site_aliases_redirect: true
|
||||
site_no_upstream_host: false
|
||||
|
||||
# Proxy settings
|
||||
# See: https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#lb_policy
|
||||
|
||||
Reference in New Issue
Block a user