Kubernetes not passing full path to Nodejs

Dec. 29, 2021

I spent hours troubleshooting why url path was getting stripped from requests in our Nodejs/Expressjs based app. The reason was this line in Kubernetes’ Ingress:

nginx.ingress.kubernetes.io/rewrite-target : /

Removing it fixed the issue. Check Kubernetes documentation

for more details.