mirror of
https://github.com/alibaba/higress.git
synced 2026-06-07 19:57:34 +08:00
fix: Fix the incorrect api-version appending logic in AzureProvider (#3289)
This commit is contained in:
@@ -206,7 +206,16 @@ func (m *azureProvider) transformRequestPath(ctx wrapper.HttpContext, apiName Ap
|
||||
path = strings.ReplaceAll(path, pathAzureModelPlaceholder, model)
|
||||
log.Debugf("azureProvider: model replaced path: %s", path)
|
||||
}
|
||||
path = path + "?" + m.serviceUrl.RawQuery
|
||||
if !strings.Contains(path, "?") {
|
||||
// No query string yet
|
||||
path = path + "?" + m.serviceUrl.RawQuery
|
||||
} else if strings.HasSuffix(path, "?") {
|
||||
// Ends with "?" and has no query parameter
|
||||
path = path + m.serviceUrl.RawQuery
|
||||
} else {
|
||||
// Has other query parameters
|
||||
path = path + "&" + m.serviceUrl.RawQuery
|
||||
}
|
||||
log.Debugf("azureProvider: final path: %s", path)
|
||||
|
||||
return path
|
||||
|
||||
Reference in New Issue
Block a user