proxy: implement preserve host header option (#671)

This commit is contained in:
Caleb Doxsey 2020-05-08 14:01:51 -06:00 committed by Travis Groth
parent 3879fe2f2a
commit d92ee8d2a0

View file

@ -133,6 +133,9 @@ func (srv *Server) buildPolicyRoutes(options config.Options, domain string) []*e
UpgradeType: "websocket",
Enabled: &wrappers.BoolValue{Value: policy.AllowWebsockets},
}},
HostRewriteSpecifier: &envoy_config_route_v3.RouteAction_AutoHostRewrite{
AutoHostRewrite: &wrappers.BoolValue{Value: !policy.PreserveHostHeader},
},
},
},
})