重构路由注册功能

This commit is contained in:
GeekMaster
2025-07-31 12:05:31 +08:00
parent 9fba68fb14
commit 0ee230cf41
46 changed files with 447 additions and 223 deletions

View File

@@ -354,12 +354,12 @@ func needLogin(c *gin.Context) bool {
}
// 跳过授权
func (s *AppServer) SkipAuth(url string, prefix bool) {
if prefix {
authConfig.PrefixPaths[url] = false
} else {
authConfig.ExactPaths[url] = false
}
func (s *AppServer) SkipAuth(url string) {
authConfig.ExactPaths[url] = false
}
func (s *AppServer) SkipAuthPrefix(url string) {
authConfig.PrefixPaths[url] = false
}
// 统一参数处理