SAP Knowledge Base Article - Preview

3109990 - "No 'Access-Control-Allow-Origin' header is present on the requested resource" error when accessing JS Storefront in CCV2

Symptom

When access JS Storefront, you may see message as below and then only the blank page displays.

If you open browser development tool > Network and reload page. You will see 500 error of the preflight request and no 'Access-Control-Allow-Origin' header is found.

In the Console, you will find below error and 504 error for the GET request.

Access to fetch at 'https://api.********-public.model-t.cc.commerce.ondemand.com/occ/v2/electronics-spa/cms/pages?fields=DEFAULT&pageType=ContentPage&pageLabelOrId=%2Fnot-found&lang=en&curr=USD' from origin 'https://jsapps.********-public.model-t.cc.commerce.ondemand.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.


Read more...

Product

SAP Commerce 2005

Keywords

KBA , CEC-COM-CPS-OTH , Other topics , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.