sonatype / nexus-public

Sonatype Nexus Repository Open-source codebase mirror
https://www.sonatype.com/products/repository-oss-download
Eclipse Public License 1.0
1.92k stars 567 forks source link

Foward proxy handling for repo indexes is broken, wrong schema/protocol #390

Open 30th-dguv opened 4 months ago

30th-dguv commented 4 months ago

Default installation of Nexus Repo Manager (3.41.1-01) running on http/8081.

It is located behind a load balances with SSL termination. For the outside world it is running on https/443.

It works smoothly. The handling of "x-forwarded-proto" header seems to work.

The only problem is the "index". If I open a link like https://myserver/service/rest/repository/browse/maven-releases/ I get a index like this:

Index of /

.index          
com             
de          
archetype-catalog.xml       Fr Apr 08 11:00:56 MESZ 2022
archetype-catalog.xml.md5   Fr Apr 08 11:00:56 MESZ 2022
...

The directory links reference the addresses like https://myserver/service/rest/repository/browse/maven-releases/com/

The file links somehow miss the https schema/protocol. They point to http://myserver/repository/maven-releases/archetype-catalog.xml. No https!


My Version: Sonatype Nexus Repository Manager OSS 3.41.1-01 3.41.1-01 Platform: Red Hat Enterprise Linux 8.9 (Ootpa)

nblair commented 4 months ago

Hi @30th-dguv thanks for opening an issue. The version you're reporting here is quite old and has been Sunset since last year (see https://help.sonatype.com/en/sonatype-nexus-repository-3-versions-status.html).

Our documentation for configuring a SSL termination and reverse proxies are detailed at https://help.sonatype.com/en/run-behind-a-reverse-proxy.html. Can you upgrade to a more contemporary version, and confirm that you've followed the reference?