This is an archive of the discontinued LLVM Phabricator instance.

Generate relative URLs instead of absolute urls for weburls.
ClosedPublic

Authored by tnfchris on Aug 6 2020, 5:04 AM.

Details

Reviewers
thopre
Summary

Currently LNT generates for the web views a url by using flask, however the documentation[1] specifies that when _External is true then an absolute URL is generated. This base url is used in links generated by the page.

This means we now emit absolute urls into the html. This is problematic as it breaks when LNT is used behind a reverse proxy. The urls used then won't match and will be incorrect.

OK for master? Also I don't have commit rights so if OK Can someone commit it for me?

[1] https://flask.palletsprojects.com/en/1.1.x/api/#flask.url_for

Diff Detail

Event Timeline

tnfchris requested review of this revision.Aug 6 2020, 5:04 AM
tnfchris created this revision.
thopre accepted this revision.Aug 6 2020, 5:28 AM

I can reproduce the issue on the public LNT instance: go to https://lnt.llvm.org/db_default/v4/nts/137175 and click on MultiSource/Benchmarks/PAQ8p/paq8p in the run-over-run Change details and see the URL change to http.

Fix LGTM, and I don't see how this could be tested easily so I'm happy to approve as is.

This revision is now accepted and ready to land.Aug 6 2020, 5:28 AM
thopre closed this revision.Aug 6 2020, 1:59 PM

Landed as 61eaf8a9eccf4edbef18f55593d1095254ed3ff5. Selected repository is incorrect so this did not close automatically.