Search code examples
mulemulesoft

apply 2 policies on the same api on different endpoints in mulesoft


Use case: I have 1 API, with 2 Endpoints, one is /heartbeatOauth and the second one is /heartbeatClientCredentials. I want to be able to apply the oAuth policy for the first endpoint, and for the second endpoint to apply the Client Id enforcement.

Is there a way to do that?


Solution

  • You can achieve this using URI regex in policy settings. More details you can find in this documentation: policies-resource-level-config-uri-regex