Kubernetes not passing full path to Nodejs

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.