To Set CORS Validation in a Flow

  1. Drag and drop a CORS Validate component from the Mule Palette into your canvas.

  2. Click the newly added CORS Validate component to access the component’s Mule Properties view.

    cors validation task 04967

  3. Click the Add button in the CORS Configuration section (cors-validation-task-60870) to create a new CORS Validate global configuration.

    cors validation task d6743

  4. Add your selected origin domain by clicking the Add button in the Origin section of the Origins Configruation.

    For each origin domain that you add, you can configure the allowed methods, response headers, and the headers to expose as part of the CORS response. You can also set the value for the Access-Control-Max-Age header.

  5. Click OK.

Additionally, you can select the Public Resource and Accepts Credentials options in the CORS validate component Mule Properties view:

  • The Public Resource option sets the rest of the flow as publicly accessible disregarding of the origin of the request.

  • The Accepts Credentials option lets you configure whether the rest of the flow accepts credentials or not.

In this topic:

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.