11

I have a TeamCity Build Status Icon in github README.md which looks as follows

[![Build Status](http://<internal-tc-server>:8111/app/rest/builds/buildType:(id:BuildID)/statusIcon)](http://<internal-tc-server>/viewType.html?buildTypeId=BuildID&guest=1)

Looks like Github caches the images in README.md and the new image src url looks as follows.

<img src="https://github-camo.global.ssl.fastly.net/xxx/yyy"/>

Since the teamcity url is within our internal network, github will not be able to access it and cant cache it properly. So, I don't see any image in the README. Is there any Image tag that I can use to disable the automatic github image caching?

Dylan Corriveau
  • 2,561
  • 4
  • 29
  • 36
Rahul
  • 903
  • 8
  • 16
  • 3
    Disabling the CDN is not possible currently: https://github.com/blog/1766-proxying-user-images. However, you might consider exposing the image via a public endpoint which doesn't require authentication, but uses unguessable tokens instead (e.g. `https:///images/?token=`). – Ivan Zuzak Mar 18 '14 at 07:03
  • Any luck since 2014? :) – Jón Trausti Arason Feb 08 '17 at 14:43
  • This situation sucks and means that we cannot have a status badge while our build server remains off the internet. – Steven Lu Jan 10 '22 at 22:41

1 Answers1

0

It is an old question, but because there are still answers to it: Github has now a possibility to handle their camo cache. https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-anonymized-urls

If you are able to set the Cache-Control header to no-cache Github should ignore the image for caching. But this does not work for private Networks as Github has documented it here: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-anonymized-urls#viewing-images-on-private-networks

mbaldi
  • 133
  • 1
  • 1
  • 7