|
|
@@ -269,6 +269,9 @@ func SetupContextForSelectedChannel(c *gin.Context, channel *model.Channel, mode
|
|
|
if channel.ChannelInfo.IsMultiKey {
|
|
|
common.SetContextKey(c, constant.ContextKeyChannelIsMultiKey, true)
|
|
|
common.SetContextKey(c, constant.ContextKeyChannelMultiKeyIndex, index)
|
|
|
+ } else {
|
|
|
+ // 必须设置为 false,否则在重试到单个 key 的时候会导致日志显示错误
|
|
|
+ common.SetContextKey(c, constant.ContextKeyChannelIsMultiKey, false)
|
|
|
}
|
|
|
// c.Request.Header.Set("Authorization", fmt.Sprintf("Bearer %s", key))
|
|
|
common.SetContextKey(c, constant.ContextKeyChannelKey, key)
|