Page MenuHomeSoftware Heritage

api: data in the error template shows the URL behind the reverse proxy
Closed, MigratedEdits Locked

Description

When getting a 404 error because of an object not found, the "Request" mirrored by the API shows the internal URL rather than the external one.

Reproducer : https://archive.softwareheritage.org/api/1/origin/deb/url/deb://Debian-Security/openldap

The "Request" area shows :

GET http://127.0.0.1:5003/api/1/origin/deb/url/deb://Debian-Security/openldap

instead of

GET https://archive.softwareheritage.org/api/1/origin/deb/url/deb://Debian-Security/openldap

Event Timeline

Prior to commit rSPPROF2faddc1f0ecb, the actual behavior was almost ok.

The "Request" area showed:

GET http://archive.softwareheritage.org/api/1/origin/deb/url/deb://Debian-Security/openldap

instead of:

GET https://archive.softwareheritage.org/api/1/origin/deb/url/deb://Debian-Security/openldap