cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrade error on OCC extension with JS Storefront 404 not found

Yasbet_Alvarez
Explorer
0 Kudos
We made a migration to the most current version of sap commerce 2211, the normal storefront works correctly but the jsstorefront application is not working correctly:
 
Access to XMLHttpRequest at 'https://api.{url}-{enviroment}-public.model-t.cc.commerce.ondemand.com/occ/v2/{site}/users/current' from origin 'https://jsapps.{url}-{enviroment}-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.
 
An extension was created with the following webroot:
ext.newextensionwebservicesocc.extension.webmodule.webroot=/occ/v2
In addition, the properties were added to the manifest.json file:
...
{
"name": "api",
"properties": [
{
"key":"xss.filter.header.X-Frame-Options",
"value":""
}
],
"webapps": [
{
"name": "newextensionwebservicesocc",
"contextPath": "/occ"
},
...

The following properties were also added:

## CORS configuration ##
########################
corsfilter.newextensionwebservicesocc.allowedOrigins=*
corsfilter.newextensionwebservicesocc.allowedHeaders=origin content-type accept authorization cache-control x-anonymous-consents x-profile-tag-debug x-consent-reference
corsfilter.newextensionwebservicesocc.exposedHeaders=x-anonymous-consents

 Do you know what configuration is needed for it to work correctly?

Accepted Solutions (1)

Accepted Solutions (1)

Yasbet_Alvarez
Explorer
0 Kudos

We found the problem

Answers (0)