1. The problem I’m having:
Hello!
The documentation of the handle
directive mentions the following:
Testing, I saw that if I set, for example, the following configuration both handle
directives are executed and the response contains the two headers, Hello
and Hola
.
(docker-service) {
import log {args[0]}
@{args[1]} host {args[0]}
handle @{args[1]} {
import security
import compression
handle /get {
header Hello hello
}
handle /get {
header Hola hola
}
reverse_proxy {args[1]}:{args[2]}
}
}
Does this mean that, even though the handle
directives that are at the same level are mutually exclusive, if the matcher is the same, are they going to be merged into a single directive and therefore both headers are sent?
The behavior I expected is that only a single header would be sent, since only a single handle
directive would be executed.
Thanks in advance.
2. Error messages and/or full log output:
-
3. Caddy version:
v2.8.4 h1:q3pe0wpBj1OcHFZ3n/1nl4V4bxBrYoSoab7rL9BMYNk=
4. How I installed and ran Caddy:
Using Docker
and Docker Compose
.
5. Links to relevant resources:
-