File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,13 @@ func (s *EndpointService) getRandomURLRealtime(endpoint *model.APIEndpoint) (str
228228 }
229229
230230 // 递归调用获取目标端点的随机URL
231- return s .GetRandomURL (targetEndpoint .URL )
231+ targetURL , err := s .GetRandomURL (targetEndpoint .URL )
232+ if err != nil {
233+ return "" , err
234+ }
235+
236+ // 对从目标端点获取的URL应用当前端点的替换规则
237+ return s .applyURLReplaceRules (targetURL , endpoint .URL ), nil
232238 }
233239
234240 return s .applyURLReplaceRules (randomURL , endpoint .URL ), nil
@@ -280,7 +286,13 @@ func (s *EndpointService) getRandomURLWithCache(endpoint *model.APIEndpoint) (st
280286 }
281287
282288 // 递归调用获取目标端点的随机URL
283- return s .GetRandomURL (targetEndpoint .URL )
289+ targetURL , err := s .GetRandomURL (targetEndpoint .URL )
290+ if err != nil {
291+ return "" , err
292+ }
293+
294+ // 对从目标端点获取的URL应用当前端点的替换规则
295+ return s .applyURLReplaceRules (targetURL , endpoint .URL ), nil
284296 }
285297
286298 return s .applyURLReplaceRules (randomURL , endpoint .URL ), nil
You can’t perform that action at this time.
0 commit comments