SAP / spartacus

Spartacus is a lean, Angular-based JavaScript storefront for SAP Commerce Cloud that communicates exclusively through the Commerce REST API.
Apache License 2.0
738 stars 383 forks source link

Spartacus on github works in Firefox, Safari but not Chrome (for some people) #548

Closed Xymmer closed 5 years ago

Xymmer commented 5 years ago

https://sap.github.io/cloud-commerce-spartacus-storefront/ For Bill/Matt: Doesn't work on Chrome For Gil: Works on Chrome

What's the diff?

I tried using CORS plugin to disable CORS blocking but no effect.

On the other hand, Firefox gives a CORS message yet allows the site anyway:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://storefront.c39j2-walkersde1-d4-public.model-t.cc.commerce.ondemand.com/rest/v2/electronics/languages?lang=en&curr=USD. (Reason: CORS request did not succeed).[Learn More] Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://storefront.c39j2-walkersde1-d4-public.model-t.cc.commerce.ondemand.com/rest/v2/electronics/cms/pages?pageType=ContentPage&pageLabelOrId=homepage&lang=en&curr=USD. (Reason: CORS request did not succeed).[Learn More] Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://fonts.gstatic.com/s/opensans/v15/mem8YaGs126MiZpBA-UFVZ0bf8pkAg.woff2. (Reason: CORS header ‘Access-Control-Allow-Origin’ does not match ‘https://storefront.c39j2-walkersde1-d2-public.model-t.cc.commerce.ondemand.com’).[Learn More]

Xymmer commented 5 years ago

timebox to 1-2 days and come to the team a standup, if not resolved

Xymmer commented 5 years ago

investigate cors configuration some more?

hackergil commented 5 years ago

corsfilter.default.allowedOrigins needed to be updated in HAC (it was pointing to localhost)

Xymmer commented 5 years ago

it works in chrome when i open an incognito mode but not in regular i cleared my cookies and still same

Xymmer commented 5 years ago

Looks like it's just Bill, works with matt, gil, scott, jim

Xymmer commented 5 years ago

finally figured this out. i have an extension, privacy badger, that was blocking the modelt server, detecting it as a possible tracker. once i whitelisted it, it worked