I identified the issue to be with the nginx being configured to set an X-Forwarded-Proto
header:
https://code.opensuse.org/heroes/salt/blob/production/f/pillar/role/pagure.sls#_54
This overwrites the X-Forwarded-Proto
header, which our TLS terminating frontend proxy (HAProxy) sets to https
:
https://code.opensuse.org/heroes/salt/blob/production/f/pillar/cluster/common/public_proxy.sls#_16
with http
, since the backend connection is using plain HTTP.
I tried simply removing the option, however it would still set it - I could not find a way to have nginx preserve the existing X-Forwarded-Proto
header from HAProxy. Hardcoding https
however works, and I think is an acceptable workaround, since we do not allow any public plain HTTP connectivity anyways through permanent redirect, and since we already implement this practice for lists.opensuse.org, which had the same issue.
I already implemented this temporarily and will follow up with the permanent patch.