Layer7 API Developer Portal: Cross-Origin Resource Sharing request pre-flight failure
search cancel

Layer7 API Developer Portal: Cross-Origin Resource Sharing request pre-flight failure

book

Article ID: 118055

calendar_today

Updated On:

Products

CA API Developer Portal CA API Gateway

Issue/Introduction

In Portal 5.x  when testing Portal APIs via API Explorer you receive the below error:
 

Error: Unable to make request. This may be due to a network error or a Cross-Origin Resource Sharing request pre-flight failure.

Environment

Release: 5.x 
Component: APIPRD

Cause

API explorer makes use of the Swagger UI. In order to complete the request, you will need to accept the proxy certificate before the request goes through.

Resolution

To resolve this you can open the URL specified in a new browser tab to accept the certificate.

Accept the proxy certificate before the request goes through Proxy URL.

https://<Server name>.<Domain>:9443/tenantName/API

Example :  from the https://<Server name>.<Domain>/admin/app/api-explorer#/Applications  , at the left size of the page look for the :

https://<Server name>.<Domain>:9443/auth/oauth/v2/token

- copy that URL in a new browser to obtain and accept the certificate.

Additionally, you will need to make sure that the service published on the Gateway has the HTTP OPTIONS method enabled and that the target URI exists.