I have a service running in a docker container in Kubernetes. It has https/tls hand off by an ingress and then into the container via http. My issue is when the webApp that's running in the container returns a redirect or a request for the resource, it is returning http endpoints not https.
So for example:
Request: https://my.service
Returns redirect: http://my.service/login.html
Is there any way around this?
Thanks for your help.
I see your application is returning redirects to http and you are trying to rewrite these http to https in responses.
When using kubernetes nginx ingress controller adding these two annotations to your ingress object will solve your problem:
nginx.ingress.kubernetes.io/proxy-redirect-from: http
nginx.ingress.kubernetes.io/proxy-redirect-to: httpsMore details can be found in ingress controller annotation descriptions and in official nginx documentation
Let me know it it helped.