feat: 支持多数据库配置与PGVector检索
This commit is contained in:
@@ -441,7 +441,6 @@ type modelCache struct {
|
||||
func checkSchemaConfig(ctx context.Context) (uint64, bool) {
|
||||
user, err := utils.GetUserInfo(ctx)
|
||||
if err != nil {
|
||||
glog.Errorf(ctx, "[DB] GetUserInfo error: %v", err)
|
||||
return 0, false
|
||||
}
|
||||
var schema = fmt.Sprintf("%s%v", schemaPrefix, user.TenantId)
|
||||
|
||||
@@ -62,7 +62,7 @@ func IPLimiter(r *ghttp.Request) {
|
||||
|
||||
// UserLimiter 用户维度限流中间件(防止单用户滥用)
|
||||
func UserLimiter(r *ghttp.Request) {
|
||||
if r.RequestURI == "/swagger" || r.RequestURI == "/admin-go/api/v1/pub/captcha/get" || r.RequestURI == "/admin-go/api/v1/system/login" {
|
||||
if strings.Contains(r.RequestURI, "/swagger") || strings.Contains(r.RequestURI, "/pub/captcha/get") || strings.Contains(r.RequestURI, "/login") || strings.Contains(r.RequestURI, "/web/socket/") {
|
||||
r.Middleware.Next()
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user