Commit Graph

8 Commits (957c75bfd21b7ff15c37eae5c8cd86bae974ac5d)

Author SHA1 Message Date
wxiaoguang 43c7a2e7b1
Refactor names ()
This PR only does "renaming":

* `Route` should be `Router` (and chi router is also called "router")
* `Params` should be `PathParam` (to distingush it from URL query param, and to match `FormString`)
* Use lower case for private functions to avoid exposing or abusing
wxiaoguang d32648b204
Refactor route path normalization ()
Refactor route path normalization and decouple it from the chi router.
Fix the TODO, fix the legacy strange path behavior.
wxiaoguang 7424f27cf3
Check if reverse proxy is correctly configured ()
Follow 
Follow 

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
wxiaoguang 67c1a07285
Refactor AppURL usage ()
Fix 
Fix 

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
wxiaoguang 53b55223d1
Ignore useless error message "broken pipe" ()
Fix 
wxiaoguang c72e1a7abb
Use strict protocol check when redirect ()
6543 274c0aea2e
Let ctx.FormOptionalBool() return optional.Option[bool] ()
just some refactoring bits towards replacing **util.OptionalBool** with
**optional.Option[bool]**
Lunny Xiao 29f149bd9f
Move context from modules to services ()
Since `modules/context` has to depend on `models` and many other
packages, it should be moved from `modules/context` to
`services/context` according to design principles. There is no logic
code change on this PR, only move packages.

- Move `code.gitea.io/gitea/modules/context` to
`code.gitea.io/gitea/services/context`
- Move `code.gitea.io/gitea/modules/contexttest` to
`code.gitea.io/gitea/services/contexttest` because of depending on
context
- Move `code.gitea.io/gitea/modules/upload` to
`code.gitea.io/gitea/services/context/upload` because of depending on
context