Nav

About Custom Policies in Pivotal Cloud Foundry

When using Anypoint Platform for Pivotal Cloud Foundry (PCF), you can install a proxy for an application and apply policies to them.

When applying policies to a non-Mule application running in PCF, this works by default. However, the following types of policies require you to reconfigure the policy:

  • SLA-based policies

  • Policies that require query strings

By default, these policies pass information like query strings, client ids, and client secrets as part of the URL. The PCF router inserts the contents of a URL into the cf-x-forwarded-url HTTP header. The URL request that the PCF router passes to the proxy is empty, but the proxy continues to expect query strings to be part of the URL.

To apply these types of policies to Mule applications deployed to PCF, you must edit the policy to read the client_id and client_secret properties from the HTTP header. Your client application must send client_id and client_secret as part of the HTTP headers when calling the API.

In this topic: