优化
This commit is contained in:
@@ -35,8 +35,8 @@ func (s *SystemConfigService) InitializeRoutes(ctx context.Context, input *Datab
|
||||
apis := make([]*biz.API, 0, len(routes))
|
||||
for _, route := range routes {
|
||||
path := route.Path
|
||||
if config := s.runtime.Admin(); config != nil && config.RouterPrefix != "" {
|
||||
path = strings.TrimPrefix(path, strings.TrimSuffix(config.RouterPrefix, "/"))
|
||||
if routerPrefix := s.settings.RouterPrefix(); routerPrefix != "" {
|
||||
path = strings.TrimPrefix(path, strings.TrimSuffix(routerPrefix, "/"))
|
||||
if path == "" {
|
||||
path = "/"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user