Skip to content

Commit

Permalink
fix gql backend basepath
Browse files Browse the repository at this point in the history
  • Loading branch information
AmaliMatharaarachchi committed Apr 9, 2024
1 parent 48f9e5b commit c376965
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 c376965

Please sign in to comment.