1
1
mirror of https://github.com/go-gitea/gitea.git synced 2026-03-27 09:01:51 +01:00
gitea/modules/web/routing
wxiaoguang 3f1ef703d5
Refactor auth middleware (#36848)
Principles: let the caller decide what it needs, but not let the
framework (middleware) guess what it should do.

Then a lot of hacky code can be removed. And some FIXMEs can be fixed.

This PR introduces a new kind of middleware: "PreMiddleware", it will be
executed before all other middlewares on the same routing level, then a
route can declare its options for other middlewares.

By the way, allow the workflow badge to be accessed by Basic or OAuth2
auth.

Fixes: https://github.com/go-gitea/gitea/pull/36830
Fixes: https://github.com/go-gitea/gitea/issues/36859
2026-03-08 17:59:46 +08:00
..
context.go Refactor auth middleware (#36848) 2026-03-08 17:59:46 +08:00
funcinfo_test.go Refactor older tests to use testify (#33140) 2025-01-09 09:21:47 +08:00
funcinfo.go Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
logger_manager.go Refactor auth middleware (#36848) 2026-03-08 17:59:46 +08:00
logger.go Fix various bugs (#35684) 2025-10-19 00:37:50 +08:00
requestrecord.go Refactor auth middleware (#36848) 2026-03-08 17:59:46 +08:00