add trimspace for url which contains spaces
@@ -77,6 +77,6 @@ func (factory *FilterFactory) PrepareFilterChain(ctx *contexthttp.HttpContext, c
func (f *Filter) Decode(c *contexthttp.HttpContext) filter.FilterStatus {
allInstances := strings.Split(c.GetAPI().IntegrationRequest.HTTPBackendConfig.URL, ",")
idx := rand.Int31n(int32(len(allInstances)))
- c.Api.IntegrationRequest.HTTPBackendConfig.URL = allInstances[idx]
+ c.Api.IntegrationRequest.HTTPBackendConfig.URL = strings.TrimSpace(allInstances[idx])
return filter.Continue
}
