Commit 3303cd1e by duyazhe

修复了百度请求时候需要传appid的bug

parent 6c9369a2
......@@ -42,7 +42,12 @@ func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) {
func (a *Adaptor) SetupRequestHeader(c *gin.Context, req *http.Header, info *relaycommon.RelayInfo) error {
channel.SetupApiRequestHeader(info, c, req)
req.Set("Authorization", "Bearer "+info.ApiKey)
infos := strings.Split(info.ApiKey, "|")
if len(infos) > 1 {
req.Set("appid", infos[1])
}
req.Set("Authorization", "Bearer "+infos[0])
return nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment