fix: apply security credentials before config validation in web handlers

Merge PR #1929
This commit is contained in:
daming大铭 authored and GitHub committed 2026-03-24 16:27:57 +08:00
commit b17cbe5234
3 files changed
+135 -9

No files matched your search

+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 {