Private
Public Access
2
0

caddy: final integration with consul

This commit is contained in:
2026-02-06 17:35:03 +03:00
parent c826b3a390
commit b4f98a207d
6 changed files with 101 additions and 9 deletions

View File

@@ -9,6 +9,19 @@
admin off
persist_config off
{% if caddy_consul %}
storage consul {
address "{{ caddy_consul_server }}"
token "{{ caddy_out_consul_token.token.SecretID }}"
timeout 10
prefix "caddy-{{ caddy_my_name }}-tls"
value_prefix "{{ caddy_my_name }}"
aes_key "{{ caddy_consul_aes_key }}"
tls_enabled "false"
tls_insecure "false"
}
{% endif %}
{% if caddy_geoip_account_id != None and caddy_geoip_license_key != None %}
geoip2 {
accountId "{{ caddy_geoip_account_id }}"
@@ -189,7 +202,20 @@
{% if site.rate_limit | default(caddy_sites_defaults.rate_limit) %}
rate_limit @not_whitelisted {
# distributed
{% if caddy_consul %}
distributed
storage consul {
address "{{ caddy_consul_server }}"
token "{{ caddy_out_consul_token.token.SecretID }}"
timeout 10
prefix "caddy-{{ caddy_my_name }}-rl"
value_prefix "{{ caddy_my_name }}"
aes_key "{{ caddy_consul_aes_key }}"
tls_enabled "false"
tls_insecure "false"
}
{% endif %}
log_key
zone remote_ip {
key {remote.ip}
events {{ site.rate_limit_events | default(caddy_sites_defaults.rate_limit_events) }}