Nexus OSS insists on combining http with 443 port

I figured it out and @rseddon was right. I previously tried only the “X-Forward-Proto” which didn’t help at that time for some reason. After I had a working workaround with ALB I gave it another try with few adjustments and here is a working configuration (it might work even without upgrading to the latest ingress-nginx, I just wanted to rule out anything related to the outdated ingress-nginx).

  1. ingress-nginx update to the latest version which still supports k8s 1.21: ingress-nginx/deploy.yaml at controller-v1.3.1 · kubernetes/ingress-nginx · GitHub
  2. Nexus Helm values with nginx annotations transformed from NXRM3/Run+Behind+a+Reverse+Proxy into configuration snippet as follows
---
ingress:
  enabled: true
  ingressClassName: "nginx"
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: "0"
    nginx.ingress.kubernetes.io/configuration-snippet: |
      more_set_headers "Host: $host";
      more_set_headers "X-Real-IP: $remote_addr";
      more_set_headers "X-Forwarded-For: $proxy_add_x_forwarded_for";
      more_set_headers "X-Forwarded-Proto: \"https\"";
  hostPath: /

Nexus repositories now show correct URL as expected.