HTTPS Gateway Service overrides the Kong domain URL

I have a kong domain i.e. https://app.kong.dev. We call apis i.e. https://app.kong.dev/api/v1/users/.
As backend, we are sending traffic to Openshift Ingress host “http://backend.apps.test.dev”. When we set that ingress as gateway service and ingress configured on HTTP only within the openshift cluster the apis run fine.

However, once we change the ingress and enable it for TLS “https://backend.apps.test.dev” the request api fails in a way that we hit kong domain in the browser and it is automatically overwritten by the ingress domain. How can I avoid this.

So I need help in making sure that kong only proxies to the ingress domain over HTTPS rather than redirect. Also can you tell me if we need to install ingress certs within kong as well. I have self signed for DEV.

This is surmising a bit but is it possible that your upstream “backend.apps.test.dev” has a 301 configured for HTTP to HTTPS? If so that might explain why you’re getting redirected from the Kong URL to the backend URL:

If that is what is in fact happening (again, bunch of assumptions here) you should be able to fix by setting the configured upstream to https instead of http or removing the 301 configuration.