fix: apply security credentials before config validation in web handlers

Merge PR #1929
This commit is contained in:
daming大铭
2026-03-24 16:27:57 +08:00
committed by GitHub
3 changed files with 135 additions and 9 deletions
+5
View File
@@ -2010,6 +2010,11 @@ func (c *Config) ValidateModelList() error {
func (c *Config) SecurityCopyFrom(cfg *Config) {
c.security = cfg.security
if c.security != nil {
if err := applySecurityConfig(c, c.security); err != nil {
logger.Errorf("failed to apply security config in SecurityCopyFrom: %v", err)
}
}
}
func MergeAPIKeys(apiKey string, apiKeys []string) []string {