fix: API Key 前缀调整为 sk-ot-
This commit is contained in:
@@ -142,7 +142,7 @@ func (g *Gateway) Auth(c *gin.Context) {
|
||||
key = strings.TrimSpace(c.GetHeader("x-api-key"))
|
||||
}
|
||||
if !apikey.Valid(key) {
|
||||
apiError(c, http.StatusUnauthorized, "invalid_api_key", "Invalid API key format. Expected: Authorization: Bearer sk-ot... or x-api-key: sk-ot...")
|
||||
apiError(c, http.StatusUnauthorized, "invalid_api_key", "Invalid API key format. Expected: Authorization: Bearer sk-ot-... or x-api-key: sk-ot-...")
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user