Is your feature request related to a problem? Please describe.
We are running Tyk gateway (oss) with operator inside a Kubernetes cluster. We are trying to call an external service located outside of cluster through ingress. For this we have created a Service of type ExternalName.
When I call this API it is calling the ExternalName service properly but the call is failing because Host header is not set to “httpbin.org”.
I tried setting the Host header in global_headers in ApiDefinition but looks like it is not getting set. Other headers are getting set properly but the Host header.
Describe the solution you'd like
Looks like there is some issue while setting Host header in the gateway. Other headers are getting set properly. Host header should be set properly to a value given in the API Definition.
Describe alternatives you've considered
I tried to create a simple API without ingress and ExternalName service and tried setting Host header there but looks like this is also not getting set.
Additional context
I can see Host header addition in gateway logs -
@anup-krai Thanks for contacting Tyk!
We apologize for the delayed response. The request is currently being reviewed and we will keep you updated as soon as we can
Is your feature request related to a problem? Please describe.
We are running Tyk gateway (oss) with operator inside a Kubernetes cluster. We are trying to call an external service located outside of cluster through ingress. For this we have created a Service of type ExternalName.
This service we have referred it in the Ingress -
When I call this API it is calling the ExternalName service properly but the call is failing because Host header is not set to “httpbin.org”. I tried setting the Host header in global_headers in ApiDefinition but looks like it is not getting set. Other headers are getting set properly but the Host header.
Describe the solution you'd like Looks like there is some issue while setting Host header in the gateway. Other headers are getting set properly. Host header should be set properly to a value given in the API Definition.
Describe alternatives you've considered I tried to create a simple API without ingress and ExternalName service and tried setting Host header there but looks like this is also not getting set.
Additional context I can see Host header addition in gateway logs -
In the error message we see the External service Name URL instead of httpbin.org GET http://external-service.tyk.svc.cluster.local/get