-
Notifications
You must be signed in to change notification settings - Fork 70
Policy on CDNs for github IconUrl should be changed #183
Description
Microsoft recommends using raw git links in nuspec's iconURL (apart from it being deprecated): https://docs.microsoft.com/en-us/nuget/reference/nuspec#iconurl
Rawgit made sense before, it has become obsolete and now directs to:
HTTP/1.1 301 Moved Permanently
...
Content-Type: text/html; charset=utf-8
Link: <https://rawgit.com/>; rel="sunset"; title="RawGit will soon shut down. Please stop using it."
Location: https://raw.githubusercontent.com/StreamWhatYouHear/SWYH/1.5.0/SWYH/Resources/Icons/swyh128.png
I recently submitted a package without even noticing. I guess many people don't and this is OK (until they remove the redirect server)!
The reason for using it was mostly fixing githubs content type and increasing loading speeds.
However it turns out https://raw.githubusercontent.com/ has become a valid CDN for most usecases (no sign of ratelimiting I am aware of). They are using https://varnish-cache.org/ served from different locations.
HTTP/1.1 200 OK
...
Content-Type: image/svg+xml
Via: 1.1 varnish
X-Served-By: cache-hhn4053-HHN
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1590576479.474429,VS0,VE200
Even if not. The chocolatey website has its own image cache. Either this is the only use, there is no need for a CDN (ratelimiting by github would have become an issue much earlier since rawgit started only redirecting). If there are client applications showing images they should probably better use https://chocolatey.org/content/packageimages/ instead of loading iconUrl.