Expand my Community achievements bar.

SOLVED

CORS error when using Set Consent via Web SDK

Avatar

Level 2

I am using Adobe Standard v2 consent standard for communicating the consent preference via Web SDK extension. It works fine for non-gdpr regions but, for GDPR regions, it shows the CORS error. Below is the the error am getting. 

Access to fetch at 'https://adobedc.demdex.net/ee/v1/privacy/set-consent?configId=<config id>:dev&requestId=781cafa4-03df-4e65-9711-13a1235400d1' from origin 'https://www.abc.com' has been blocked by CORS policy: 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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @VAgarwal26_eClerx 

This looks like issues about content security policy. 

A Content Security Policy (CSP) is an HTTP header and security feature that gives browsers control over what type of resources are loaded on a Web page.

In your case, you need to add .demdex.net domain and other domains or URLs to your CSP header to functioning.  if you're not able to do then you need ask your development team and they can able to do it for you. 

Here is more reference about what  CSP is and how it works.

Configuring a CSP 

Hope this helps. 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @VAgarwal26_eClerx 

This looks like issues about content security policy. 

A Content Security Policy (CSP) is an HTTP header and security feature that gives browsers control over what type of resources are loaded on a Web page.

In your case, you need to add .demdex.net domain and other domains or URLs to your CSP header to functioning.  if you're not able to do then you need ask your development team and they can able to do it for you. 

Here is more reference about what  CSP is and how it works.

Configuring a CSP 

Hope this helps.