Help with Secure CSP Header

via Freelancer ·

Budget / SalaryA$30–250
TypeFreelance project
LocationRemote
Posted11 minutes ago
We have the following CSP:

==== ==== ====
# Content Security Policy
default-src 'self';
script-src 'report-sample' 'self' https://app.sharelinktechnologies.com/widget/js https://www.google.com/recaptcha/api.js https://www.googletagmanager.com/gtag/js https://www.gstatic.com/recaptcha/releases/4i3aN5wAweL7i3ADI7BSX4B-/recaptcha__en.js;
script-src-elem https://www.google.com/recaptcha/api.js https://www.google.com/recaptcha/api.js
style-src 'report-sample' 'self' https://fonts.googleapis.com;
object-src 'none';
base-uri 'self';
connect-src 'self' https://analytics.google.com https://www.google.com.au;
font-src 'self' https://fonts.gstatic.com;
frame-src 'self' https://app.sharelinktechnologies.com/ https://player.vimeo.com https://www.google.com;
img-src 'self' data: https://www.googletagmanager.com;
manifest-src 'self';
media-src 'self';
report-uri https://6afc179ea0d77b6242d7cabc.endpoint.csper.io?builder=true&v=2;
worker-src 'none';
==== ==== ====

However, our frontend has console errors:

==== ==== ====
Loading the stylesheet 'https://fonts.googleapis.com/css?family=Inter:100,200,300,regular,500,600,700,800,900&subset=latin,latin-ext&display=swap' violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' 'unsafe-eval'". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback. The action has been blocked.

Loading the script 'https://www.googletagmanager.com/gtag/js?id=GT-P3MN8WT' violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback. The action has been blocked.

Loading the script 'https://app.sharelinktechnologies.com/widget/js' violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback. The action has been blocked.
==== ==== ====

As far as I know, these hosts are in the right place in the CSP.

Hepl
web security website testing
Apply on Freelancer →

Project sourced from Freelancer.com. Applications happen directly on the original platform — we never collect your data.