Time tracking start/stop link to port not reverse proxy address #1257

Closed
opened 2025-11-02 03:54:25 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @b4d on GitHub (Nov 18, 2017).

  • Gitea version (or commit ref):4683e54
  • Git version: 2.11.0
  • Operating system: Debian 9.2
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I am using gitea via Apache reverse proxy, that shoots port 3000 to my gitea.domain.com.

The problem is that time tracknig plugin "start" and "stop" buttons link to domain.com:3000 instead of gitea.domain.com.

Time tracking works ok, but when I click start or stop, it tries to resolve domain.com:3000 and the request fails miserably.

Same thing happens if I try to add time manually "Add" button in the popup adds the time, but redirects me to domain.com:3000 again instead of gitea.domain.com

Probably the time tracker should consider the settings and act accordingly.

Screenshots

Originally created by @b4d on GitHub (Nov 18, 2017). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref):4683e54 - Git version: 2.11.0 - Operating system: Debian 9.2 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description I am using gitea via Apache reverse proxy, that shoots port 3000 to my gitea.domain.com. The problem is that time tracknig plugin "start" and "stop" buttons link to domain.com:3000 instead of gitea.domain.com. Time tracking works ok, but when I click start or stop, it tries to resolve domain.com:3000 and the request fails miserably. Same thing happens if I try to add time manually "Add" button in the popup adds the time, but redirects me to domain.com:3000 again instead of gitea.domain.com Probably the time tracker should consider the settings and act accordingly. ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the type/question label 2025-11-02 03:54:25 -06:00
Author
Owner

@jonasfranz commented on GitHub (Nov 22, 2017):

Could you please add your config.ini?

@jonasfranz commented on GitHub (Nov 22, 2017): Could you please add your config.ini?
Author
Owner

@b4d commented on GitHub (Nov 22, 2017):

I have app.ini :)

APP_NAME = git.site.org
RUN_USER = git
RUN_MODE = prod

[database]
DB_TYPE  = mysql
HOST     = localhost:3306
NAME     = prod_gitea
USER     = prod_gitea
PASSWD   = 123456
SSL_MODE = disable
PATH     = data/gitea.db

[repository]
ROOT = /home/git/gitea-repositories

[server]
SSH_DOMAIN   = site.org
HTTP_PORT    = 3000
ROOT_URL     = https://site.org:3000/
DISABLE_SSH  = false
SSH_PORT     = 22
OFFLINE_MODE = false

[mailer]
ENABLED = false

[service]
REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL     = false
DISABLE_REGISTRATION   = true
ENABLE_CAPTCHA         = false
REQUIRE_SIGNIN_VIEW    = false

[picture]
DISABLE_GRAVATAR        = false
ENABLE_FEDERATED_AVATAR = true

[session]
PROVIDER = file

[log]
MODE      = file
LEVEL     = Info
ROOT_PATH = /var/log/gitea/

[security]
INSTALL_LOCK   = true
SECRET_KEY     = 1234
INTERNAL_TOKEN = 1234

Now that I am looking, could this line be the problem:
ROOT_URL = https://site.org:3000/

maybe it should point to
ROOT_URL = https://localhost:3000/

@b4d commented on GitHub (Nov 22, 2017): I have app.ini :) ``` APP_NAME = git.site.org RUN_USER = git RUN_MODE = prod [database] DB_TYPE = mysql HOST = localhost:3306 NAME = prod_gitea USER = prod_gitea PASSWD = 123456 SSL_MODE = disable PATH = data/gitea.db [repository] ROOT = /home/git/gitea-repositories [server] SSH_DOMAIN = site.org HTTP_PORT = 3000 ROOT_URL = https://site.org:3000/ DISABLE_SSH = false SSH_PORT = 22 OFFLINE_MODE = false [mailer] ENABLED = false [service] REGISTER_EMAIL_CONFIRM = false ENABLE_NOTIFY_MAIL = false DISABLE_REGISTRATION = true ENABLE_CAPTCHA = false REQUIRE_SIGNIN_VIEW = false [picture] DISABLE_GRAVATAR = false ENABLE_FEDERATED_AVATAR = true [session] PROVIDER = file [log] MODE = file LEVEL = Info ROOT_PATH = /var/log/gitea/ [security] INSTALL_LOCK = true SECRET_KEY = 1234 INTERNAL_TOKEN = 1234 ``` Now that I am looking, could this line be the problem: `ROOT_URL = https://site.org:3000/` maybe it should point to `ROOT_URL = https://localhost:3000/`
Author
Owner

@b4d commented on GitHub (Nov 22, 2017):

Okay, I have changed that to:
ROOT_URL = https://git.site.org

and this tracking problem is resolved.

I wonder if I broke something else along the way. Otherwise consider this one closed :)

@b4d commented on GitHub (Nov 22, 2017): Okay, I have changed that to: `ROOT_URL = https://git.site.org` and this tracking problem is resolved. I wonder if I broke something else along the way. Otherwise consider this one closed :)
Author
Owner

@b4d commented on GitHub (Nov 22, 2017):

Cool, thanks for the node in the right direction, sometimes that is all we need :)

@b4d commented on GitHub (Nov 22, 2017): Cool, thanks for the node in the right direction, sometimes that is all we need :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1257