-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
area/middlewarekind/bug/confirmeda confirmed bug (reproducible).a confirmed bug (reproducible).priority/P2need to be fixed in the futureneed to be fixed in the futurestatus/5-frozen-due-to-age
Milestone
Description
Do you want to request a feature or report a bug?
Bug
What did you do?
Expect to see custom headers when the headers middleware is used.
What did you expect to see?
custom headers
What did you see instead?
When the chain middleware is used custom headers are not present in the response.
Output of traefik version: (What version of Traefik are you using?)
v2.1
(paste your output here)
What is your environment & configuration (arguments, toml, provider, platform, ...)?
# (paste your configuration here)Using chain the custom headers are not present.
Example docker-compose-bug.yml
~/Documents/src/traefik-bug/root1 ᐅ cat docker-compose-bug.yml
version: '3'
services:
reverse-proxy:
image: traefik:v2.1
networks:
- traefik-bug-root1
command:
- '--providers.docker'
ports:
- 8095:80
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always
test:
networks:
- traefik-bug-root1
image: hashicorp/http-echo
command: "-listen :5000 -text='hi'"
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.test.rule=PathPrefix(`/test`)'
- 'traefik.http.routers.test.middlewares=test'
- 'traefik.http.services.test.loadbalancer.server.port=5000'
- 'traefik.http.middlewares.test.chain.middlewares=test-headers,test-compress'
- 'traefik.http.middlewares.test-compress.compress=true'
- 'traefik.http.middlewares.test-headers.headers.customresponseheaders.X-Custom-Response-Header=value'
networks:
traefik-bug-root1:
driver: bridgeIf the chain middleware is not used custom headers are present.
~/Documents/src/traefik-bug/root1 ᐅ cat docker-compose-ok.yml
version: '3'
services:
reverse-proxy:
image: traefik:v2.1
networks:
- traefik-bug-root1
command:
- '--providers.docker'
ports:
- 8095:80
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always
test:
networks:
- traefik-bug-root1
image: hashicorp/http-echo
command: "-listen :5000 -text='hi'"
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.test.rule=PathPrefix(`/test`)'
- 'traefik.http.routers.test.middlewares=test-headers'
- 'traefik.http.services.test.loadbalancer.server.port=5000'
- 'traefik.http.middlewares.test-headers.headers.customresponseheaders.X-Custom-Response-Header=value'
networks:
traefik-bug-root1:
driver: bridgeIf applicable, please paste the log output in DEBUG level (--log.level=DEBUG switch)
(paste your output here)
Metadata
Metadata
Assignees
Labels
area/middlewarekind/bug/confirmeda confirmed bug (reproducible).a confirmed bug (reproducible).priority/P2need to be fixed in the futureneed to be fixed in the futurestatus/5-frozen-due-to-age