From 49466d0d1452dcb6ab4154b23b9321552ced552c Mon Sep 17 00:00:00 2001 From: Regner Blok-Andersen Date: Wed, 15 Feb 2017 16:11:31 -0800 Subject: [PATCH] Added documentation about defining the passing of host header globaly --- docs/user-guide/kubernetes.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/user-guide/kubernetes.md b/docs/user-guide/kubernetes.md index 05225c6cd..44eb68a96 100644 --- a/docs/user-guide/kubernetes.md +++ b/docs/user-guide/kubernetes.md @@ -434,8 +434,15 @@ By default Træfɪk will pass the incoming Host header on to the upstream resour are times however where you may not want this to be the case. For example if your service is of the ExternalName type. -To disable passing the Host header set the "traefik.frontend.passHostHeader" annotation on -your ingress to "false". +### Disable entirely +Add the following to your toml config: +```toml +disablePassHostHeaders = true +``` + +### Disable per ingress +To disable passing the Host header per ingress resource set the "traefik.frontend.passHostHeader" +annotation on your ingress to "false". Here is an example ingress definition: ```yaml @@ -472,4 +479,8 @@ spec: If you were to visit example.com/static the request would then be passed onto static.otherdomain.com/static and static.otherdomain.com would receive the -request with the Host header being static.otherdomain.com. \ No newline at end of file +request with the Host header being static.otherdomain.com. + +Note: The per ingress annotation overides whatever the global value is set to. So you +could set `disablePassHostHeaders` to true in your toml file and then enable passing +the host header per ingress if you wanted. \ No newline at end of file