cancel
Showing results for 
Search instead for 
Did you mean: 

CORS Policy issue when trying to call CPI endpoint from SAP CPQ

vinaykumardigaveedi
Participant

Hi Experts,

We have developed some custom java code in SAP CPQ to trigger the CPI end point to fetch data from On-premise BRIM system, But below is the error we are facing in CPQ while trying to call CPI end point.

Access to fetch at 'https://zzzz-iflmap.hcisbp.bb.hana.ondemand.com/http/CPQ' from origin 'https://YYYycpq.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Could you please help us resolve the issue?

Accepted Solutions (0)

Answers (2)

Answers (2)

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos

vinaykumard

As you see CORS issue is coming from source domain (CPI). As per above comment from Priyanka, you have it fix through API Management having additional policy.

vinaykumardigaveedi
Participant
0 Kudos

Hi @Yogananda Muthaiah,

Thanks,

But in our case, we don't have any API Management.

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos
vinaykumard

there are lot of other 3rd party extensions to solve CORS issue.. through nodejs, python, go languages can solve your problem.

you can find lot of examples google search, you can find any such to fix your issue.

PriyankaChak
Active Contributor
0 Kudos

Hi Vinay,

To handle CORS, you can use SAP APIM before SAP CPI endpoint.

https://help.sap.com/doc/c008301836ef40e1960d6a5f40cb9d01/CLOUD/en-US/Unit%2004.4.11%20-%20CORS%20Po...

Regards,

Priyanka