127 lines
2.7 KiB
Caddyfile
127 lines
2.7 KiB
Caddyfile
{
|
|
auto_https off
|
|
order crowdsec first
|
|
order rate_limit before crowdsec
|
|
servers {
|
|
timeouts {
|
|
read_body 60m
|
|
read_header 10s
|
|
write 0s
|
|
idle 120s
|
|
}
|
|
max_header_size 64kb
|
|
}
|
|
crowdsec {
|
|
api_url http://crowdsec:8080
|
|
api_key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
ticker_interval 15s
|
|
disable_streaming
|
|
enable_hard_fails
|
|
}
|
|
}
|
|
|
|
(rate_limit_strict) {
|
|
rate_limit {
|
|
zone strict {
|
|
key {client_ip}
|
|
events 5000
|
|
window 1m
|
|
}
|
|
}
|
|
}
|
|
|
|
(rate_limit_login) {
|
|
rate_limit {
|
|
zone login {
|
|
key {client_ip}
|
|
events 500
|
|
window 5m
|
|
}
|
|
}
|
|
}
|
|
|
|
(security_headers) {
|
|
header {
|
|
X-Content-Type-Options nosniff
|
|
X-Frame-Options SAMEORIGIN
|
|
Referrer-Policy no-referrer
|
|
X-Permitted-Cross-Domain-Policies none
|
|
-Server
|
|
}
|
|
}
|
|
|
|
(access_log) {
|
|
log {
|
|
output file /var/log/caddy/access.log {
|
|
roll_size 100mb
|
|
roll_keep 5
|
|
}
|
|
format json
|
|
}
|
|
}
|
|
|
|
http://vacpro.fyi {
|
|
import access_log
|
|
import security_headers
|
|
import rate_limit_strict
|
|
redir http://moxiu.vacpro.fyi{uri}
|
|
}
|
|
|
|
http://moxiu.vacpro.fyi {
|
|
import access_log
|
|
import security_headers
|
|
import rate_limit_strict
|
|
reverse_proxy 172.17.0.1:3001
|
|
}
|
|
|
|
http://photos.vacpro.fyi {
|
|
import access_log
|
|
import security_headers
|
|
import rate_limit_strict
|
|
reverse_proxy immich_server:2283 {
|
|
header_up X-Forwarded-For {client_ip}
|
|
header_up X-Forwarded-Proto https
|
|
header_up X-Real-IP {client_ip}
|
|
header_up Host {host}
|
|
}
|
|
}
|
|
|
|
http://zita.vacpro.fyi {
|
|
import access_log
|
|
import security_headers
|
|
import rate_limit_login
|
|
reverse_proxy zitadel-proxy-1:80 {
|
|
header_up X-Forwarded-For {client_ip}
|
|
header_up X-Forwarded-Proto https
|
|
header_up X-Forwarded-Host {host}
|
|
header_up X-Real-IP {client_ip}
|
|
header_up Host {host}
|
|
}
|
|
}
|
|
|
|
http://vw.vacpro.fyi {
|
|
import access_log
|
|
import security_headers
|
|
import rate_limit_login
|
|
reverse_proxy vaultwarden:80 {
|
|
header_up X-Forwarded-For {client_ip}
|
|
header_up X-Forwarded-Proto https
|
|
header_up X-Forwarded-Host {host}
|
|
header_up X-Real-IP {client_ip}
|
|
header_up Host {host}
|
|
}
|
|
}
|
|
|
|
http://zip.vacpro.fyi {
|
|
request_body {
|
|
max_size 200GB
|
|
}
|
|
reverse_proxy zipline:3000 {
|
|
header_up X-Forwarded-For {client_ip}
|
|
header_up X-Forwarded-Proto https
|
|
header_up X-Forwarded-Host {host}
|
|
header_up X-Real-IP {client_ip}
|
|
header_up Host {host}
|
|
}
|
|
}
|