validator-badge icon indicating copy to clipboard operation
validator-badge copied to clipboard

Validator badges not being rendered on Github

Open harrisj opened this issue 7 years ago • 6 comments

GitHub seems to proxy images and for some reason the badge is not making it through that process correctly. So, you see a broken image on the page and a link going to a URL like https://camo.githubusercontent.com/<long_hash_string> that is 404ing. You can see the failure on your own README. I have tried flipping it to use a https URL instead (since camo is for wrapping insecure image requests), but that doesn't seem to have made a difference. Given that many people put badges on their README.md, this is likely to affect many users. Thanks!

harrisj avatar May 17 '17 16:05 harrisj

Unfortunately that's how GitHub is handling dynamic requests. I don't know of a way around it.

fehguy avatar May 17 '17 16:05 fehguy

Well, is it possible that we could trick Github by allowing a request to validator.svg (or whatever the type of the image is)?

harrisj avatar May 17 '17 16:05 harrisj

I think this is intentional with GH, it's how they avoid people sneaking tracking scripts into pages. I'm not an expert in it, and it changes often but I've seen this happen where you save the page and instead of rendering a dynamic image, they'll make a copy and save it in their CDN.

fehguy avatar May 17 '17 16:05 fehguy

Ah well, I've had to remove the badge from our README, but I would like to be able to add it back in the future if this ever gets resolved. Thank you.

harrisj avatar May 18 '17 13:05 harrisj

@fehguy they just cache the image for whatever the Cache-Control is set to

cptaffe avatar Aug 23 '17 01:08 cptaffe

Possible dupe of #77

MikeRalphson avatar Jun 28 '18 13:06 MikeRalphson