mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-18 04:10:51 +08:00
fix(config): dedupe and normalize Gemini keys and headers
This commit is contained in:
@@ -12,7 +12,13 @@ import (
|
||||
)
|
||||
|
||||
func (h *Handler) GetConfig(c *gin.Context) {
|
||||
c.JSON(200, h.cfg)
|
||||
if h == nil || h.cfg == nil {
|
||||
c.JSON(200, gin.H{})
|
||||
return
|
||||
}
|
||||
cfgCopy := *h.cfg
|
||||
cfgCopy.GlAPIKey = geminiKeyStringsFromConfig(h.cfg)
|
||||
c.JSON(200, &cfgCopy)
|
||||
}
|
||||
|
||||
func (h *Handler) GetConfigYAML(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user