Our web server constantly gets CSP reports of violations even though we have added the domain as well as even a wildcard to just allow all for api2.amplitude.com.
{
"csp-report":{
"document-uri":"<redacted>",
"referrer":"<redacted>",
"violated-directive":"connect-src",
"effective-directive":"connect-src",
"original-policy":"base-uri 'self';object-src 'none'; report-uri /csp-report; img-src 'self' data: *;style-src 'unsafe-eval' 'unsafe-inline' 'self' *; font-src 'unsafe-eval' 'unsafe-inline' 'self' data: *; connect-src 'report-sample' 'self' api2.amplitude.com *; media-src 'self' blob: data: *; script-src 'unsafe-eval' 'unsafe-inline' 'report-sample' 'self' cdn.amplitude.com https://maps.googleapis.com https://maps.gstatic.com https://connect.facebook.net; default-src 'unsafe-eval' 'unsafe-inline' 'report-sample' 'self' cdn.amplitude.com;",
"disposition":"enforce",
"blocked-uri":"https://api2.amplitude.com/2/httpapi",
"status-code":200,
"script-sample":""
}
}
This keeps saying that we are violating connect-src but our connect-src policy is: connect-src 'report-sample' 'self' api2.amplitude.com *;
We’ve tried with just the wildcard as well but same result.
Currently api2.amplitude.com is the only one trigger the violation.
FYI, we still get events from browsers but this CSP violation happens almost once a day so we have concerns about potential loss of events.
Please help!