54 lines
1.0 KiB
Caddyfile
54 lines
1.0 KiB
Caddyfile
:80 {
|
|
rate_limit {
|
|
zone api {
|
|
key {remote_host}
|
|
events 30
|
|
window 1m
|
|
match {
|
|
path /api/*
|
|
}
|
|
}
|
|
|
|
zone metrics {
|
|
key {remote_host}
|
|
events 10
|
|
window 1m
|
|
match {
|
|
path /metrics
|
|
}
|
|
}
|
|
|
|
zone general {
|
|
key {remote_host}
|
|
events 100
|
|
window 1m
|
|
}
|
|
}
|
|
|
|
reverse_proxy gpon-monitoring-app:{$LISTEN_PORT}
|
|
|
|
header {
|
|
-Server
|
|
-X-Powered-By
|
|
-Via
|
|
}
|
|
|
|
@static {
|
|
path *.css *.js
|
|
}
|
|
handle @static {
|
|
header Cache-Control "public, max-age=3600, immutable"
|
|
reverse_proxy gpon-monitoring-app:{$LISTEN_PORT}
|
|
}
|
|
|
|
@api {
|
|
path /api/*
|
|
}
|
|
handle @api {
|
|
header Cache-Control "no-cache, no-store, must-revalidate"
|
|
reverse_proxy gpon-monitoring-app:{$LISTEN_PORT}
|
|
}
|
|
|
|
encode gzip zstd
|
|
}
|