mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-29 15:13:49 +03:00
160d199999
Previous commit improved the Caddyfile adapter so it doesn't unnecessarily add names to "skip" in "auto_https" when the server is already HTTP-only. This commit updates the tests to reflect that change, while also fixing the Caddyfile formatting in many of the tests. We also print the line number of the divergence between input and formatted version in Caddyfile adapt warnings - very useful for finding initial formatting problems.
78 lines
854 B
Text
78 lines
854 B
Text
{
|
|
servers {
|
|
timeouts {
|
|
idle 90s
|
|
}
|
|
}
|
|
servers :80 {
|
|
timeouts {
|
|
idle 60s
|
|
}
|
|
}
|
|
servers :443 {
|
|
timeouts {
|
|
idle 30s
|
|
}
|
|
}
|
|
}
|
|
|
|
foo.com {
|
|
}
|
|
|
|
http://bar.com {
|
|
}
|
|
|
|
:8080 {
|
|
}
|
|
|
|
----------
|
|
{
|
|
"apps": {
|
|
"http": {
|
|
"servers": {
|
|
"srv0": {
|
|
"listen": [
|
|
":443"
|
|
],
|
|
"idle_timeout": 30000000000,
|
|
"routes": [
|
|
{
|
|
"match": [
|
|
{
|
|
"host": [
|
|
"foo.com"
|
|
]
|
|
}
|
|
],
|
|
"terminal": true
|
|
}
|
|
]
|
|
},
|
|
"srv1": {
|
|
"listen": [
|
|
":80"
|
|
],
|
|
"idle_timeout": 60000000000,
|
|
"routes": [
|
|
{
|
|
"match": [
|
|
{
|
|
"host": [
|
|
"bar.com"
|
|
]
|
|
}
|
|
],
|
|
"terminal": true
|
|
}
|
|
]
|
|
},
|
|
"srv2": {
|
|
"listen": [
|
|
":8080"
|
|
],
|
|
"idle_timeout": 90000000000
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|