Skip to content

Commit dc36c63

Browse files
committed
caddy
1 parent f80ff3c commit dc36c63

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

infra/caddy/Caddyfile.local

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
{
44
auto_https off
55

6-
# Enable metrics collection for HTTP handlers
7-
servers {
8-
metrics
9-
}
10-
116
# Admin API listens only on localhost within container for security
127
# Prometheus accesses /metrics via the dedicated :9180 listener, not the admin API
138
admin 127.0.0.1:2019
9+
10+
# Enable metrics collection for HTTP handlers
11+
metrics
1412
}
1513

1614
# It tells Caddy to listen on its internal port 80 for any incoming hostname.

infra/caddy/Caddyfile.prod

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
http_port 80
44
https_port 443
55

6-
# Enable metrics collection for HTTP handlers
7-
servers {
8-
metrics
9-
}
10-
116
# Admin API listens only on localhost within container for security
127
# Prometheus accesses /metrics via the dedicated :9180 listener, not the admin API
138
admin 127.0.0.1:2019
9+
10+
# Enable metrics collection for HTTP handlers
11+
metrics
1412
}
1513

1614
# Caddy will automatically provision a Let's Encrypt certificate.
@@ -75,11 +73,8 @@ oullin.io {
7573
}
7674

7775
reverse_proxy api:8080 {
78-
# preserve original host/proto/client ip to the app
76+
# preserve original host to the app
7977
header_up Host {host}
80-
header_up X-Forwarded-Host {host}
81-
header_up X-Forwarded-Proto {scheme}
82-
header_up X-Forwarded-For {remote}
8378

8479
# pass through app-specific headers
8580
header_up X-API-Username {http.request.header.X-API-Username}
@@ -104,9 +99,6 @@ oullin.io {
10499
handle {
105100
reverse_proxy web:80 {
106101
header_up Host {host}
107-
header_up X-Forwarded-Host {host}
108-
header_up X-Forwarded-Proto {scheme}
109-
header_up X-Forwarded-For {remote}
110102
}
111103
}
112104
}

0 commit comments

Comments
 (0)