fix: minor bugfixes & border cases

This commit is contained in:
2026-02-13 05:00:32 -03:00
parent 5c84b78600
commit 36663e63ec
9 changed files with 46 additions and 27 deletions

View File

@@ -5,11 +5,11 @@
# Enable metrics for Prometheus
metrics
# Logging - console for Docker logs and file for CrowdSec/Promtail
# Logging - JSON format required for Promtail label extraction
log {
level INFO
output file /var/log/caddy/access.log
format console
format json
}
# Allow CrowdSec globally
@@ -20,5 +20,14 @@
}
# Reusable WAF snippet — use `import waf` in any site block
(waf) {
coraza_waf {
directives `
Include /etc/caddy/coraza.conf
`
}
}
# Import all site configurations from sites-enabled directory
import /etc/caddy/sites-enabled/*.Caddyfile

View File

@@ -7,13 +7,22 @@
# file_server
# }
# Example: Reverse Proxy for service running in docker container (must be under caddy_net)
# api.example.com {
# coraza_waf {
# directives `
# Include /etc/caddy/coraza.conf
# `
# }
# Example: Reverse Proxy for a Docker container app
#
# Requirements: the app container must be on caddy_net.
# Add the following to your app's docker-compose.yml:
#
# services:
# my-app:
# image: my-app:latest
# networks:
# - caddy_net
#
# networks:
# caddy_net:
# external: true
#
# api.example.com {
# import waf
# reverse_proxy * http://{CONTAINER_NAME}:{CONTAINER_PORT}
# }