Skip to end of banner
Go to start of banner

Setting Up a CORS Restriction Policy for Try It Out

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Current »

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.

For older JCC nodes (Version 4.28 and older), a new or modified CORS Restriction policy for an individual API might not take effect in the Try It Out feature for up to two hours due to caching.

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.

  • No labels