I guess someone else already said it, our devops fixed it by patching nginx.
proxy_set_header X-Forwarded-Proto $scheme;