CORS Restriction Policy settings for the Try It Out feature for APIs.
Overview
To enable the Try it out button for your API in the Developer Portal catalog, the API must include a CORS Restriction policy.
- An existing API defined in the API Manager
- In the API Manager, go to the API Details tab of the target API and add a CORS Restriction Policy.
- Configure the CORS Restriction Policy.
-
Add an Access Control Allow Origins entry. Set the value to the URL to your control plane.
Example:
https://control-plane-name.snaplogic.com
Where
control-plane-name is the control plane you are using. For example,
- Add three Access Control Request Headers entries.
Set the values to the following:
Accept
Authorization
Content-Type
- Select Access Control Allow Credentials.
- Click Validate & Save.