Edit runner issue when my-gitea.com -> www.my-gitea.com #14384

Closed
opened 2025-11-02 11:11:31 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @bilogic on GitHub (Apr 17, 2025).

Description

Hi,

  1. I setup my instance a while back without www
  2. For various reasons, recently I switch to www
  3. It all works, except, when I visit /-/admin/actions/runners/1 on www, it redirects me back to my-gitea.com and asks me to login
  4. It is strange because I'm able to see /-/admin/actions/runners

Any ideas?

Gitea Version

1.23.4

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

MySQL/MariaDB

Originally created by @bilogic on GitHub (Apr 17, 2025). ### Description Hi, 1. I setup my instance a while back without www 2. For various reasons, recently I switch to www 3. It all works, except, when I visit `/-/admin/actions/runners/1` on www, it redirects me back to my-gitea.com and asks me to login 4. It is strange because I'm able to see `/-/admin/actions/runners` Any ideas? ### Gitea Version 1.23.4 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? docker ### Database MySQL/MariaDB
GiteaMirror added the issue/needs-feedbacktype/bug labels 2025-11-02 11:11:31 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Apr 17, 2025):

For various reasons, recently I switch to www

Maybe something incomplete in this step. Or please provide a reproducible setup with detailed steps.

@wxiaoguang commented on GitHub (Apr 17, 2025): > For various reasons, recently I switch to www Maybe something incomplete in this step. Or please provide a reproducible setup with detailed steps.
Author
Owner

@bilogic commented on GitHub (Apr 17, 2025):

For various reasons, recently I switch to www

Maybe something incomplete in this step. Or please provide a reproducible setup with detailed steps.

# app.ini
# DOMAIN = https://my-gitea.com/
# SSH_DOMAIN = https://my-gitea.com/
# ROOT_URL = https://my-gitea.com/
DOMAIN = https://www.my-gitea.com/
SSH_DOMAIN = https://www.my-gitea.com/
ROOT_URL = https://www.my-gitea.com/
  1. These are the only settings I changed for the switch, and this allowed me to login using https://www.my-gitea.com/
  2. But when I try to edit my first runner https://www.my-gitea.com/-/admin/actions/runners/1, it redirects back to https://my-gitea.com to login

I suppose what I'm trying to ask is, what checks are there on /admin/actions/runners/1 to cause the redirect? Because I configured whole gitea to require auth and other pages I'm using work, only this one does not.

@bilogic commented on GitHub (Apr 17, 2025): > > For various reasons, recently I switch to www > > Maybe something incomplete in this step. Or please provide a reproducible setup with detailed steps. ``` # app.ini # DOMAIN = https://my-gitea.com/ # SSH_DOMAIN = https://my-gitea.com/ # ROOT_URL = https://my-gitea.com/ DOMAIN = https://www.my-gitea.com/ SSH_DOMAIN = https://www.my-gitea.com/ ROOT_URL = https://www.my-gitea.com/ ``` 1. These are the only settings I changed for the switch, and this allowed me to login using https://www.my-gitea.com/ 2. But when I try to edit my first runner https://www.my-gitea.com/-/admin/actions/runners/1, it redirects back to https://my-gitea.com to login I suppose what I'm trying to ask is, what checks are there on /admin/actions/runners/1 to cause the redirect? Because I configured whole gitea to require auth and other pages I'm using work, only this one does not.
Author
Owner

@wxiaoguang commented on GitHub (Apr 17, 2025):

# app.ini

Except "ROOT_URL", other values are not right.

But when I try to edit my first runner

Do you mean "click the edit icon" or "submit the form"? What link do you see? Do you mean that:

  • you can visit https://www.your-gitea.com/-/admin
  • if you visit https://www.your-gitea.com/-/admin/actions/runners/1 then browser redirects to https://your-gitea.com/user/login without any intermediate responses?
@wxiaoguang commented on GitHub (Apr 17, 2025): > `# app.ini` Except "ROOT_URL", other values are not right. > But when I try to edit my first runner Do you mean "click the edit icon" or "submit the form"? What link do you see? Do you mean that: * you can visit `https://www.your-gitea.com/-/admin` * if you visit `https://www.your-gitea.com/-/admin/actions/runners/1` then browser redirects to `https://your-gitea.com/user/login` without any intermediate responses?
Author
Owner

@bilogic commented on GitHub (Apr 17, 2025):

# app.ini

Except "ROOT_URL", other values are not right.

Hmm... I modified what I saw... should I modify further?

Do you mean "click the edit icon" or "submit the form"? What link do you see? Do you mean that:

  • you can visit https://www.your-gitea.com/-/admin
  • if you visit https://www.your-gitea.com/-/admin/actions/runners/1 then browser redirects to https://your-gitea.com/user/login without any intermediate responses?

Yes all correct, the edit icon here:

Image

@bilogic commented on GitHub (Apr 17, 2025): > > `# app.ini` > > Except "ROOT_URL", other values are not right. Hmm... I modified what I saw... should I modify further? > Do you mean "click the edit icon" or "submit the form"? What link do you see? Do you mean that: > * you can visit `https://www.your-gitea.com/-/admin` > * if you visit `https://www.your-gitea.com/-/admin/actions/runners/1` then browser redirects to `https://your-gitea.com/user/login` without any intermediate responses? Yes all correct, the edit icon here: ![Image](https://github.com/user-attachments/assets/e496b27c-7088-4b0b-96d9-cd7ebb03f0a4)
Author
Owner

@wxiaoguang commented on GitHub (Apr 17, 2025):

Yes all correct, the edit icon here:

But that link is a relative link to current page's URL.

Do you see /-/admin/actions/runners/1 or https://www.your-gitea.com/........ or https://your-gitea.com/..... for its "href"?

@wxiaoguang commented on GitHub (Apr 17, 2025): > Yes all correct, the edit icon here: But that link is a relative link to current page's URL. Do you see `/-/admin/actions/runners/1` or `https://www.your-gitea.com/........` or `https://your-gitea.com/.....` for its "href"?
Author
Owner

@bilogic commented on GitHub (Apr 17, 2025):

No, href is a www.my-gitea.com, anyway after your feedback, I decided to try login on a incognito tab. Now no issues, seems like there is some strong caching headers in /admin/actions/runners/1

Since it is a caching problem somewhere, closing this issue. Thank you very much.

@bilogic commented on GitHub (Apr 17, 2025): No, href is a www.my-gitea.com, anyway after your feedback, I decided to try login on a incognito tab. Now no issues, seems like there is some strong caching headers in `/admin/actions/runners/1` Since it is a caching problem somewhere, closing this issue. Thank you very much.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14384