swagger-api/validator-badge

Validator badges not being rendered on Github

harrisj opened this issue · 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!

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

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

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.

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.

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

Possible dupe of #77