From 1f9dc5d1526b8748466afad2d5c63d6f9e1c38a0 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 9 Oct 2018 10:33:57 -0700 Subject: [PATCH] Remove use of RawGit CDN (https://twitter.com/rawgit/status/1049360165030567937) --- update.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/update.sh b/update.sh index 3b2544453..3ea141baa 100755 --- a/update.sh +++ b/update.sh @@ -78,11 +78,12 @@ for image in "${images[@]}"; do if [ "$logoFile" ]; then logoCommit="$(git log -1 --format='format:%H' -- "$logoFile" 2>/dev/null || true)" [ "$logoCommit" ] || logoCommit='master' + logoUrl="https://raw.githubusercontent.com/docker-library/docs/$logoCommit/$logoFile" if [ "${logoFile##*.}" = 'svg' ]; then - logo="![logo](https://cdn.rawgit.com/docker-library/docs/$logoCommit/$logoFile)" - else - logo="![logo](https://raw.githubusercontent.com/docker-library/docs/$logoCommit/$logoFile)" + # https://stackoverflow.com/a/16462143/433558 + logoUrl+='?sanitize=true' fi + logo="![logo]($logoUrl)" fi stack=