Repo links on dashboard wrong when using a proxy frontend #9256

Closed
opened 2025-11-02 08:33:22 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @doodyd on GitHub (Jul 22, 2022).

Description

The repository links on the dashboard repository widget are incorrect when gitea is behind a proxy (HAProxy in my case). All other links so far encountered are correct.

Example:

Repository link on dashboard (repo widget, pictured below):

http://gitea.example.com:3000/org/repo-name

All other repo links (all other links so far):

https://proxy-name.example.com/org/repo-name

Gitea Version

1.16.7

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

n/a

Screenshots

image

Git Version

2.35.2

Operating System

TrueNAS-13.0-U1 Core (jail)

How are you running Gitea?

Installed in jail from default package manager

Database

MySQL

Originally created by @doodyd on GitHub (Jul 22, 2022). ### Description The repository links on the dashboard repository widget are incorrect when gitea is behind a proxy (HAProxy in my case). All other links so far encountered are correct. Example: Repository link on dashboard (repo widget, pictured below): http://gitea.example.com:3000/org/repo-name All other repo links (all other links so far): https://proxy-name.example.com/org/repo-name ### Gitea Version 1.16.7 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist n/a ### Screenshots ![image](https://user-images.githubusercontent.com/29137584/180369588-da9883e8-b0de-4f40-842c-dbb0a37f6144.png) ### Git Version 2.35.2 ### Operating System TrueNAS-13.0-U1 Core (jail) ### How are you running Gitea? Installed in jail from default package manager ### Database MySQL
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 08:33:22 -06:00
Author
Owner

@silverwind commented on GitHub (Jul 22, 2022):

Generally this can be solved via configuration by setting ROOT_URL accordingly, but I'll take this up as a bug as we should not render absolute URLs in HTML where relative ones (without origin) are sufficient.

@silverwind commented on GitHub (Jul 22, 2022): Generally this can be solved via configuration by setting `ROOT_URL` accordingly, but I'll take this up as a bug as we should not render absolute URLs in HTML where relative ones (without origin) are sufficient.
Author
Owner

@wxiaoguang commented on GitHub (Jul 22, 2022):

This one #19345

@wxiaoguang commented on GitHub (Jul 22, 2022): This one #19345 * https://github.com/go-gitea/gitea/issues/19345
Author
Owner

@silverwind commented on GitHub (Jul 22, 2022):

Okay, it's a duplicate then.

@silverwind commented on GitHub (Jul 22, 2022): Okay, it's a duplicate then.
Author
Owner

@doodyd commented on GitHub (Jul 23, 2022):

Thanks for the feedback and the tip. I searched the issues for a similar problem but it can be difficult to know what terms to use. Changing the ROOT_URL has resolved the issue.

@doodyd commented on GitHub (Jul 23, 2022): Thanks for the feedback and the tip. I searched the issues for a similar problem but it can be difficult to know what terms to use. Changing the ROOT_URL has resolved the issue.
Author
Owner

@LaserLV52 commented on GitHub (Oct 28, 2022):

Hi, i have installed the gitea in Truenas Scale (not core). Now, i have the ROOT_URL error too. But, when i modify the ROOT_URL in app.ini and reboot the gitea, the ROOT_URL didn't work, it still convert back into the default ROOT_URL in app.ini. Do you have any idea? thanks!

@LaserLV52 commented on GitHub (Oct 28, 2022): Hi, i have installed the gitea in Truenas Scale (not core). Now, i have the ROOT_URL error too. But, when i modify the ROOT_URL in app.ini and reboot the gitea, the ROOT_URL didn't work, it still convert back into the default ROOT_URL in app.ini. Do you have any idea? thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9256