mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-16 21:56:40 -05:00
388c7e898c
* metrics: move `metrics` up, outside `servers` This change moves the metrics configuration from per-server level to a single config knob within the `http` app. Enabling `metrics` in any of the configured servers inside `http` enables metrics for all servers. Fix #6604 Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com> * normalize domain name --------- Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
37 lines
393 B
Text
37 lines
393 B
Text
{
|
|
servers :80 {
|
|
metrics {
|
|
per_host
|
|
}
|
|
}
|
|
}
|
|
:80 {
|
|
respond "Hello"
|
|
}
|
|
----------
|
|
{
|
|
"apps": {
|
|
"http": {
|
|
"servers": {
|
|
"srv0": {
|
|
"listen": [
|
|
":80"
|
|
],
|
|
"routes": [
|
|
{
|
|
"handle": [
|
|
{
|
|
"body": "Hello",
|
|
"handler": "static_response"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"metrics": {
|
|
"per_host": true
|
|
}
|
|
}
|
|
}
|
|
}
|