Skip to content

Commit

Permalink
Merge pull request #2339 from AmaliMatharaarachchi/gql-basepath
Browse files Browse the repository at this point in the history
Fix gql backend basepath
  • Loading branch information
AmaliMatharaarachchi committed May 31, 2024
2 parents 4c0ca3f + c376965 commit 07f3ec1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions adapter/internal/oasparser/envoyconf/routes_configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,7 @@ func generateRewritePathRouteConfig(routePath string, policyParams interface{},
if paramsToSetHeader, ok = policyParams.(map[string]interface{}); !ok {
return nil, fmt.Errorf("error while processing policy parameter map. Map: %v", policyParams)
}
if rewritePath, ok = paramsToSetHeader[constants.RewritePathResourcePath].(string); !ok ||
strings.TrimSpace(rewritePath) == "" {
if rewritePath, ok = paramsToSetHeader[constants.RewritePathResourcePath].(string); !ok {
return nil, errors.New("policy parameter map must include rewritePath")
}
if rewritePathType, ok = paramsToSetHeader[constants.RewritePathType].(gwapiv1.HTTPPathModifierType); !ok ||
Expand Down

0 comments on commit 07f3ec1

Please sign in to comment.