Symptom
This KBA explains how to configure CORS in SAP Commerce, SAP Commerce Cloud and Composable Storefront as misconfiguring it can lead to unexpected behaviors, such as empty screens with errors in the console of the browser similar to the following:
Access to XMLHttpRequest at 'https://api.xxx.model-t.cc.commerce.ondemand.com/occ/v2/electronics-spa/cms/pages?lang=en&curr=USD' from origin 'http://localhost:4200' 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. |
Read more...
Environment
- SAP Commerce
- SAP Commerce Cloud
- SAP Commerce Cloud, Composable Storefront
Product
SAP Commerce Cloud all versions ; SAP Commerce Cloud, composable storefront all versions ; SAP Commerce all versions
Keywords
Blocked, CORS, policy, Access-Control-Allow-Origin header, TBD, storefront, composable, spartacus, ccv2, spa, hybris, cross, origin, domain , KBA , CEC-SCC-COM-BC-BCOM , Base Commerce , CEC-SPA , SAP Commerce Cloud Spartacus , CEC-SCC-COM-BBA-ACC , Accelerator , How To
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.