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

Content Security Policy error preventing script from running #4

Open
flyer1 opened this issue Jan 28, 2020 · 0 comments
Open

Content Security Policy error preventing script from running #4

flyer1 opened this issue Jan 28, 2020 · 0 comments

Comments

@flyer1
Copy link

flyer1 commented Jan 28, 2020

I wonder if automating downloads of fonts from fontastic is still possible (which would be wonderful)

The script appears to fail on the initial request at line 28.
If I isolate that line and run the following in the console (using fetch browser API):
fetch('https://file.myfontastic.com/(MY-API-KEY)/icons.css')

I get a content security policy error:
VM143:1 Refused to connect to 'https://file.myfontastic.com/(MY-API-KEY)/icons.css' because it violates the document's Content Security Policy.

My understanding of this is that the host (fontastic) is only allowing connections from a whitelist of servers that they control. Correct me if I'm wrong.

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

No branches or pull requests

1 participant