Closed einschmidt closed 6 years ago
Just found out it was a mistake in my config. It is already possible...
Just found out it was a mistake in my config. It is already possible...
Could you please share how did you manage to do that? I see you are missing the commas in your example, but once corrected I'm unable to use several "line":"content", because when I save the config and reload the add-on page, it only shows the last one.
So:
"raw_config": [
{
"line": "proxy XYZ.duckdns.org 172.17.0.1:8123 {",
"line": " keepalive 10",
"line": "}"
}]
becomes:
"raw_config": [
{
"line": "}"
}]
I've only been able to use multiple lines this way:
"raw_config": [
{
"line": "proxy XYZ.duckdns.org 172.17.0.1:8123 {\n keepalive 10\n }"
}]
...but I consider it a workaround.
At the end I solved it this way:
"raw_config": [
{
"line": "proxy XYZ.duckdns.org 172.17.0.1:8123 {"
},
{
"line": " keepalive 10"
},
{
"line": "}"
}
]
Great, thanks for sharing!!
At the end I solved it this way:
"raw_config": [ { "line": "proxy XYZ.duckdns.org 172.17.0.1:8123 {" }, { "line": " keepalive 10" }, { "line": "}" } ]
Great, thanks for sharing!!
I don't use this anymore... I will look at it to see if I can improve the style. A list of strings should be enough !
The last release simplify the syntax with a list of string only. Your example will become :
"raw_config": [
"proxy XYZ.duckdns.org 172.17.0.1:8123 {",
" keepalive 10",
"}"
]
The Caddy proxy currently supports single line raw configurations only:
"raw_config": [ { "line": "proxy XYZ.duckdns.org 172.17.0.1:8123" }
However, the power of Caddy can be revieled with multi lines only. Therefore it should be possible to achieve the following Caddy configuration:
I am not sure where and how, but maybe it would be sufficient enough to allow multiple "line" entries? Example: