Setting Up a CORS Restriction Policy for Try It Out

In this article

Overview

To enable the Try it out button for your API in the Developer Portal catalog, the API must include a CORS Restriction policy.

Prerequisites

  • An existing API defined in the API Manager

Steps

  1. In the API Manager, go to the API Details tab of the target API and add a CORS Restriction policy.
    Learn how to add a policy to your API.

  2. Configure the CORS Restriction Policy.

    Add Policy dialog
    1. Add an Access Control Allow Origins entry. Set the value to the URL to your pod.

      Example: https://elastic.snaplogic.com

    2. Add three Access Control Request Headers entries. Set the values to the following:

      • Accept

      • Authorization

      • Content-Type

    3. Select Access Control Allow Credentials.

  3. Click Validate & Save.

Related links