Pass host header for TCP

Hello traefikers :slight_smile:
I see the option to PASS HOST HEADER under TCP:

I tried looking in the docs and don't see anything on how to change this...

Is this a thing? How should I be using this feature properly with kubernetes?

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
  name: example.com-tls
spec:
  entryPoints:
  - websecure
  routes:
  - match: HostSNI(`example.com`)
    priority: 10
    services:
    - name: example
      port: 443
      passHostHeader: true
      healthCheck:
        path: /metrics
        port: 9000
        intervalSeconds: 7
        timeoutSeconds: 60
  tls:
    passthrough: true

Header is a concept from HTTP protocol. TCP does not have a concept of an HTTP header.

thats what i thought but wondered why the ui was there.

Indeed. @ldez an oversight?

Thank you for the feedback :pray:
I have been able to reproduce it and I opened a PR with a fix: https://github.com/containous/traefik/pull/5868

2 Likes