Commit Graph

6 Commits (5821d22891cb3aa1e1c9590d8b921728b4969c5f)

Author SHA1 Message Date
wxiaoguang 84cbb6c4d2
Fix duplicate sub-path for avatars ()
Fix , and add tests

And this PR introduces an undocumented & debug-purpose-only config
option: `USE_SUB_URL_PATH`. It does nothing for end users, it only helps
the development of sub-path related problems.

And also fix 

Co-authored-by: @ExplodingDragon
wxiaoguang 339bc8bc8f
Improve reverse proxy documents and clarify the AppURL guessing behavior ()
Fix 

1. Mention Make sure `Host` and `X-Fowarded-Proto` headers are correctly passed to Gitea
2. Clarify the basic requirements and move the "general configuration" to the top
3. Add a comment for the "container registry"
4. Use 1.21 behavior if the reverse proxy is not correctly configured

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
wxiaoguang 67c1a07285
Refactor AppURL usage ()
Fix 
Fix 

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
wxiaoguang ca4107dc96
Refactor external URL detection ()
Follow , `IsExternalURL` is not needed anymore. 
Add some tests for `RedirectToCurrentSite`
wxiaoguang 01500957c2
Refactor URL detection ()
"Redirect" functions should only redirect if the target is for current Gitea site.
wxiaoguang b71cb7acdc
Use fetch to send requests to create issues/comments ()
Follow 

Network error won't make content lost. And this is a much better
approach than "loading-button".

The UI is not perfect and there are still some TODOs, they can be done
in following PRs, not a must in this PR's scope.

<details>


![image](https://github.com/go-gitea/gitea/assets/2114189/c94ba958-aa46-4747-8ddf-6584deeed25c)

</details>