Backend response headers


Does anyone know where I can view response headers from backend (upstream) within traefik?

Hi @yassine.laz, as we discussed this on 1:1, there are different ways to check the headers.

Here are 2 of them:

  • Using a "dummy" backend webserver which prints the request header: the Docker image containous/whoami is a tool for this job. The goal is to create a backend which is as close as possible as the one you want to check headers for. But instead, you're using the containous/whoami application, which will prints the request headers to the response body. Please find 2 simple examples for Docker (Compose/Swarm) and Kubernetes:

  • Start a troubleshooting side-kick container to Traefik, and use a command line to sniff traffic, and watch the HTTP protocol header values. Example with tcpdump on container sharing the same network stack as Traefik's (same network interface):

docker run --rm -it --network=container:<traefik container id> \
  nicolaka/netshoot tcpdump -vvvn -i eth0 port 80

Does it look good to you?

1 Like

Can't wait to try these. Thank you @dduportal, You are a blessing for this community.