-
Notifications
You must be signed in to change notification settings - Fork 12
All: add CSP exceptions for remote images #10
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
Conversation
// Leaving out typekit img-src, which only loads the p.gif for analytics | ||
'img-src' => "'self' code.jquery.com", | ||
'img-src' => "'self' about: *.cloudfront.net events.jquery.org openjsf.org *.twimg.com gruntjs.com *.imgur.com code.jquery.com", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's okay with you, I'd like to import and self-host into the blog these images.
At least the ones from imgur.com
and twimg.com
(which are prone to deletion these days). I'd backfill from Internet Archive for any that are already gone.
Feel free to roll this out as-is either way, we can reduce it later.
I've edited a handful of posts, and downloaded the file, and attached it files directly instead. E.g. https://i.imgur.com/Fof2lcP.gif on https://blog.jquery.com/2015/04/21/announcing-pep-0-3-0/. For twimg, the URLs were already broken, so those I downloaded from the Internet Archive instead, e.g. http://a3.twimg.com/profile_images/927486315/Ralph_web_reasonably_small.jpg and http://a3.twimg.com/profile_images/1130303999/rey2_reasonably_small.png. imgur
After
twimg
After
|
For
|
For the images from |
For cloudfront.net, there was only one post (https://blog.jquery.com/2014/04/15/jquery-chicago-pebble-giveaway-and-filing-extension/). It embedded the Pebble logo, which had also gone 404 since. The post also contained an image from events.jquery.org. I've restored both via the Internet Archive. For gruntjs.com, there was also only one post. That image had moved, and thus was also broken either way. Restored from an archive capture around the same time. https://blog.jquery.com/2015/11/19/grunt-rebooted/, http://gruntjs.com/img/grunt-logo.png
|
I couldn't find any posts embedding URLs from |
That was from the redirect. I knew it would 404, but I wanted to remove the CSP reports. |
There's still some posts on https://blog.jquery.com/category/events/ with some events.jquery.org images we could get from the archive. I'll do that now. |
Right, from events.jquery.org. Makes sense! |
I think we took care of all of them and this PR is now unnecessary. Thanks! |
Add CSP exceptions for images loaded on the following pages:
https://blog.jquery.com/category/events/
https://blog.jquery.com/category/foundation/
https://blog.jquery.com/category/projects/
https://blog.jquery.com/category/weekly-news/
Ref jquery/infrastructure-puppet#54
Closes gh-10