Skip to content
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

Refactor AppURL usage #30885

Merged
merged 5 commits into from
May 7, 2024
Merged

Refactor AppURL usage #30885

merged 5 commits into from
May 7, 2024

Conversation

wxiaoguang
Copy link
Contributor

Fix #30883
Fix #29591

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 7, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 7, 2024
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code labels May 7, 2024
@wxiaoguang wxiaoguang added the backport/v1.22 This PR should be backported to Gitea 1.22 label May 7, 2024
@lunny
Copy link
Member

lunny commented May 7, 2024

Maybe we should update the nginx and other reverse proxy documentation to ask a header, otherwise some of them may not work.

@wxiaoguang
Copy link
Contributor Author

Maybe we should update the nginx and other reverse proxy documentation to ask a header, otherwise some of them may not work.

I think it could be done later. The reasons are:

  1. The code is pretty safe, even if the reverse proxy configuration is wrong, there won't be real problem (for > 99.9% cases)
  2. The nginx document is already good enough
  3. I do not use other reverse proxies, so I don't want to mix the unclear parts in this PR

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 7, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 7, 2024
@wxiaoguang wxiaoguang enabled auto-merge (squash) May 7, 2024 08:12
@wxiaoguang wxiaoguang merged commit 67c1a07 into go-gitea:main May 7, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone May 7, 2024
@wxiaoguang wxiaoguang deleted the fix-app-url branch May 7, 2024 08:40
@wxiaoguang
Copy link
Contributor Author

To address the concern of "what about end users do not have their reverse proxy configured":

-> Check if reverse proxy is correctly configured #30890

wxiaoguang added a commit to wxiaoguang/gitea that referenced this pull request May 7, 2024
@wxiaoguang wxiaoguang added type/bug backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! labels May 7, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request May 8, 2024
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  Apply to become a maintainer (go-gitea#30884)
  Refactor AppURL usage (go-gitea#30885)
  Move database operations of merging a pull request to post receive hook and add a transaction (go-gitea#30805)
  Fix missing migrate actions artifacts (go-gitea#30874)
wxiaoguang added a commit that referenced this pull request May 8, 2024
wxiaoguang added a commit that referenced this pull request May 10, 2024
Follow #27011
Follow #30885

---------

Co-authored-by: silverwind <[email protected]>
Co-authored-by: Giteabot <[email protected]>
GiteaBot added a commit to GiteaBot/gitea that referenced this pull request May 10, 2024
wxiaoguang added a commit that referenced this pull request May 10, 2024
Backport #30890 by wxiaoguang

Follow #27011
Follow #30885

Co-authored-by: wxiaoguang <[email protected]>
Co-authored-by: silverwind <[email protected]>
lunny pushed a commit that referenced this pull request Jun 1, 2024
)

Resolves #31167.

#30885 changed the behavior of
`repo.AvatarLink()` where it can now take the empty string and append it
to the app data URL. This does not point to a valid avatar image URL,
and, as the issue mentions, previous Gitea versions returned the empty
string.

---------

Co-authored-by: wxiaoguang <[email protected]>
jpraet pushed a commit to jpraet/gitea that referenced this pull request Jul 5, 2024
…gitea#31187)

Backport go-gitea#31187

Resolves go-gitea#31167.

go-gitea#30885 changed the behavior of
`repo.AvatarLink()` where it can now take the empty string and append it
to the app data URL. This does not point to a valid avatar image URL,
and, as the issue mentions, previous Gitea versions returned the empty
string.

---------

Co-authored-by: wxiaoguang <[email protected]>
6543 pushed a commit that referenced this pull request Jul 5, 2024
) (#31567)

Backport #31187

Resolves #31167.

#30885 changed the behavior of
`repo.AvatarLink()` where it can now take the empty string and append it
to the app data URL. This does not point to a valid avatar image URL,
and, as the issue mentions, previous Gitea versions returned the empty
string.

Co-authored-by: Kemal Zebari <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! backport/v1.22 This PR should be backported to Gitea 1.22 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/bug
Projects
None yet
4 participants