Skip to content

Commit

Permalink
Merge pull request #12719 from dakshina99/policy-not-found
Browse files Browse the repository at this point in the history
Make Policy Path Comparison Case-Insensitive
  • Loading branch information
tharikaGitHub authored Dec 9, 2024
2 parents 92a6a6f + 59f736c commit d0299b8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2751,7 +2751,7 @@ public Mediation getMediationPolicy(Organization org, String apiId, String media
int prependIndex = apiPath.lastIndexOf("/api");
String apiResourcePath = apiPath.substring(0, prependIndex);
String policyPath = GovernanceUtils.getArtifactPath(registry, mediationPolicyId);
if (!policyPath.startsWith(apiResourcePath)) {
if (!policyPath.toLowerCase().startsWith(apiResourcePath.toLowerCase())) {
throw new MediationPolicyPersistenceException("Policy not foud ", ExceptionCodes.POLICY_NOT_FOUND);
}
Resource mediationResource = registry.get(policyPath);
Expand Down

0 comments on commit d0299b8

Please sign in to comment.