setting proto and hostname in HREF of Anchor breaks all links if accessed behind the proxy
Summary
in file_name_link
(web ui Repository -> Files) proto and hostname are set for HREF, so uri is pointing to nonaccesible location.
Same time router_link
and tree_commit_link
are correct.
Steps to reproduce
Set up gitlab (ver 12.9.2 (ac5568eb5d8)) behind proxy (internal gitlab.localdomain external gitlab.example.com) and browse to gitlab.example.com -> Repository -> Files and click on some file.
You will get error can't find server gitlab.localdomain
What is the current bug behavior?
Anchor objects are forced to internal uri: http://gitlab.localdomain/../repository/components/table/row.vue
so it is not accessible from https://gitlab.example.com
What is the expected correct behavior?
Browsing from behind the proxy links are pointing to proxy address: https://gitlab.lexample.com/../repository/components/table/row.vue
not to http://gitlab.localdomain/../repository/components/table/row.vue
Relevant logs screenshots
Possible fixes
Do not set proto and hostname for HREF of Anchor object for internal links.