-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ARTIFACT_ROOT_URL
#30883
Support ARTIFACT_ROOT_URL
#30883
Conversation
I think if there is such a use case, we should make the "http ctx" support "X-Forwarded-Xxx" headers, then no need to add any new config option. Ref: |
I have thought about this, but I'm not sure if it could cause more problems. In my mind, it's something like:
And you have got the point: " |
It is de-facto standard. I am sure we should introduce it sooner or later. Let me describe what I understand now (correct me if I am wrong):
If it is so, I will propose a general solution, we only need to tell end users: please configure your reverse proxy properly , and actually, it has been well documented for long time: https://docs.gitea.com/administration/reverse-proxies#nginx |
Your understanding is completely right. If we required any proxy for Gitea provides |
For this case, I think it could also be right in most cases. I will try to propose a solution. ps: do we need it in 1.22? |
You mean the issue of artifacts? I think it's not a hurry since there are some workarounds. But I agree to do it in 1.22 since it's just RC1, and it doesn't break anything as long as users configure the proxy correctly. |
Does #30885 look good to you? Will write some tests. |
Let's follow it, this PR can be closed now. |
Fix #30883 Fix #29591 --------- Co-authored-by: KN4CK3R <[email protected]>
Fix go-gitea#30883 Fix go-gitea#29591 --------- Co-authored-by: KN4CK3R <[email protected]>
Backport #30885 Fix #30883 Fix #29591 Co-authored-by: KN4CK3R <[email protected]>
Fix https://gitea.com/gitea/act_runner/issues/541
Users may use a non-ROOT_URL address to register a runner, since the ROOT_URL may be a public address listened by a reverse proxy.
Most communication between runners and Gitea (like calling API and cloning repo) uses the URL provided during registration, except for uploading or downloading artifacts. These addresses are generated by Gitea and provided to the runners. Gitea always uses the ROOT_URL to generate these addresses, causing the runner to upload or download artifacts from the public network.
This PR adds an new configuration
ARTIFACT_ROOT_URL
to indicate the address for uploading or downloading artifacts. If not specified, the ROOT_URL is still used.