add specific header for any traffic through kalm route
@@ -44,6 +44,7 @@ const (
)
const KALM_SSO_USERINFO_HEADER = "kalm-sso-userinfo"
+const KALM_ROUTE_HEADER = "kalm-route"
var DANGEROUS_HEADERS = []string{
KALM_SSO_USERINFO_HEADER,
@@ -75,6 +76,9 @@ func (r *HttpRouteReconcilerTask) buildIstioHttpRoute(route *corev1alpha1.HttpRo
Headers: &istioNetworkingV1Beta1.Headers{
Request: &istioNetworkingV1Beta1.Headers_HeaderOperations{
Remove: DANGEROUS_HEADERS,
+ Set: map[string]string{
+ KALM_ROUTE_HEADER: "true",
+ },
},
},
}
