0

I am using some MDN to load styles and fonts from google but in it is throwing error in the console.

lwc_engine.js:6242 Refused to load the stylesheet 'https://www.google.com/recaptcha/api.js' because it violates the following Content Security Policy directive: "style-src 'self' chrome-extension: 'unsafe-inline' *.visualforce.com https://computing-computing-8460-dev-ed--c.documentforce.com". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

How will I include the MDN styles and fonts into lightning web component.

1

It looks like there is no CSP rule configured in the CSP Trusted Sites

This is an overview of CSP: https://help.salesforce.com/articleView?id=csp_trusted_sites.htm&type=5

This shows the steps of how to add a new remote site: https://help.salesforce.com/articleView?id=configuring_remoteproxy.htm&type=5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.