But Caddy always fails to parse such multiline config regardless of is there backslashes or not, is there either | or > before multiline value or not... There are always errors like caddy | [2024-06-07 19:00:25] ERROR: Failed to get Container Caddyfile [logger=docker-proxy] template: :1: unexpected "\\\\" in operand or caddy | [2024-06-07 18:58:28] ERROR: Failed to get Container Caddyfile [logger=docker-proxy] template: :1: unexpected "\}" in operand. It's the parsing problem.
I try to implement such logic to rewrite HTTP 307 response from some backend to a HTTP 200 one.
Equivalent in Caddyfile would be:
How could I implement this code block in Caddy Docker Proxy?
Approach №1
Something like:
But Caddy always fails to parse such multiline config regardless of is there backslashes or not, is there either
|
or>
before multiline value or not... There are always errors likecaddy | [2024-06-07 19:00:25] ERROR: Failed to get Container Caddyfile [logger=docker-proxy] template: :1: unexpected "\\\\" in operand
orcaddy | [2024-06-07 18:58:28] ERROR: Failed to get Container Caddyfile [logger=docker-proxy] template: :1: unexpected "\}" in operand
. It's the parsing problem.Approach №2
Caddyfile:
using it:
yet it produces the same errors as above.
How could I put multiline JSON block in YAML label value?