SAP Knowledge Base Article - Preview

3089617 - There are 2 ways to setup CORS for Spartacus, which way has higher priority when they are both configured?

Symptom

There is following issue in browser console

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. 


***Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.***


Read more...

Environment

SAP Commcerce with Spartacus

Product

SAP Commerce all versions

Keywords

has been blocked by CORS policy, No 'Access-Control-Allow-Origin' header, TBD , KBA , CEC-SPA , SAP Commerce Cloud Spartacus , 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.