codersrank-org / summary-widget

Integrate your CodersRank profile summary to your personal website
https://codersrank.io
MIT License
23 stars 13 forks source link

Widget doesn't work as an image #5

Closed Zenoo closed 1 year ago

Zenoo commented 3 years ago

I tried adding the widget to my Github profile, but only a broken image shows up.

When I use the URL in the browser directly, the image loads but only after quite a while, which is I guess why it doesn't work on github profiles, since Github camouflages links.

https://cr-ss-service.azurewebsites.net/api/ScreenShot?widget=summary&username=Zenoo&badges=3
v https://camo.githubusercontent.com/9314b853ceb50726a52464c11d3130dc1fd14f4f1e4024617c4799407a89af63/68747470733a2f2f63722d73732d736572766963652e617a75726577656273697465732e6e65742f6170692f53637265656e53686f743f7769646765743d73756d6d61727926757365726e616d653d5a656e6f6f266261646765733d33

hoangph271 commented 2 years ago

The content type in the response header is not image, but actually a document, this might be why GitHub reject the image

MikeJerred commented 1 year ago

Should probably also include the correct cache header see: https://github.com/github/markup/issues/224#issuecomment-48532178

peti2001 commented 1 year ago

Yesterday we deployed the solution. Thanks for reporting the issue and for your suggestions. Cache headers are still missing. But we will add them later.