Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSP config problem with Google fonts #66

Closed
kokujin opened this issue Aug 11, 2014 · 3 comments
Closed

CSP config problem with Google fonts #66

kokujin opened this issue Aug 11, 2014 · 3 comments

Comments

@kokujin
Copy link

kokujin commented Aug 11, 2014

I have my font-src configured as follows:

HTML:

<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,300,400,500,700">

Helmet:

    fontSrc: [
        "'self'",
        'fonts.googleapis.com',
        'themes.googleusercontent.com'
    ]

but I am getting this error in the console:

Refused to load the font 'https://fonts.gstatic.com/s/opensans/v9/DXI1ORHCpsQm3Vp6mXoaTRampu5_7CjHW5spxoeN3Vs.woff2' because it violates the following Content Security Policy directive: "font-src 'self' fonts.googleapis.com themes.googleusercontent.com".

Can someone tell me what I am doing wrong? Thanks

@kokujin
Copy link
Author

kokujin commented Aug 11, 2014

I added this entry to the list

'fonts.gstatic.com'

And the console errors stopped. Was this the correct way?

@EvanHahn
Copy link
Member

Yes! That's perfect.

Would it help to add that kind of instruction to some documentation somewhere?

@kokujin
Copy link
Author

kokujin commented Aug 12, 2014

Yes it would help, and a link to the official csp docs. Thanks
On Aug 11, 2014 7:22 PM, "Evan Hahn" notifications@github.com wrote:

Yes! That's perfect.

Would it help to add that kind of instruction to some documentation
somewhere?


Reply to this email directly or view it on GitHub
#66 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants