Skip to content

Commit

Permalink
fix invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
tharindu1st committed Jan 30, 2025
1 parent 536abad commit d00db0f
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions gateway/enforcer/internal/extproc/ext_proc.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,25 +215,25 @@ func (s *ExternalProcessingServer) Process(srv envoy_service_proc_v3.ExternalPro
dynamicMetadataKeyValuePairs[organizationMetadataKey] = s.requestConfigHolder.MatchedAPI.OrganizationID
dynamicMetadataKeyValuePairs[orgAndRLPolicyMetadataKey] = fmt.Sprintf("%s-%s", s.requestConfigHolder.MatchedAPI.OrganizationID, s.requestConfigHolder.MatchedSubscription.RatelimitTier)
}
rhq := &envoy_service_proc_v3.HeadersResponse{
Response: &envoy_service_proc_v3.CommonResponse{
HeaderMutation: &envoy_service_proc_v3.HeaderMutation{
SetHeaders: []*corev3.HeaderValueOption{
{
Header: &corev3.HeaderValue{
Key: "x-wso2-cluster-header",
RawValue: []byte(attributes.ClusterName),
},
}
rhq := &envoy_service_proc_v3.HeadersResponse{
Response: &envoy_service_proc_v3.CommonResponse{
HeaderMutation: &envoy_service_proc_v3.HeaderMutation{
SetHeaders: []*corev3.HeaderValueOption{
{
Header: &corev3.HeaderValue{
Key: "x-wso2-cluster-header",
RawValue: []byte(attributes.ClusterName),
},
},
},
// This is necessary if the remote server modified headers that are used to calculate the route.
ClearRouteCache: true,
},
}
resp.Response = &envoy_service_proc_v3.ProcessingResponse_RequestHeaders{
RequestHeaders: rhq,
}
// This is necessary if the remote server modified headers that are used to calculate the route.
ClearRouteCache: true,
},
}
resp.Response = &envoy_service_proc_v3.ProcessingResponse_RequestHeaders{
RequestHeaders: rhq,
}

case *envoy_service_proc_v3.ProcessingRequest_RequestBody:
Expand Down

0 comments on commit d00db0f

Please sign in to comment.