-
-
Notifications
You must be signed in to change notification settings - Fork 199
Open
Description
Hey!
Problem:
Merging two directives from different config sources under the same site block does not work.
Example:
Caddyfile
example.domain.com {
handle_path /chat/* {
uri strip_prefix /chat
reverse_proxy chat:3002
}
}
docker-compose.yaml
...
labels:
caddy: example.domain.com
caddy.handle: "/*"
caddy.handle.reverse_proxy: "{{upstreams 3000}}"
...
I would expect those directives to be merged under the same site domain like this:
example.domain.com {
handle {
reverse_proxy: {{ upstreams 3000 }}
}
handle_path /chat/* {
uri strip_prefix /chat
reverse_proxy chat:3002
}
}
However that doesn't work and instead I get this error:
{"level":"info","ts":1752836013.019566,"logger":"docker-proxy","msg":"Process Caddyfile","logs":"[ERROR] Removing invalid block: Caddyfile:2: unrecognized global option: handle_path\n{\n\thandle_path /chat/* {\n\t\treverse_proxy 172.18.0.3:3002\n\t\tstrip_prefix /chat\n\t}\n}\n\n"}
secondtruth
Metadata
Metadata
Assignees
Labels
No labels