Uploads stored in hashed paths could use GITLAB_CDN_HOST to improve gitlab.com page view performance
When you load gitlab.com, public avatars use GITLAB_CDN_HOST, for example https://assets.gitlab-static.net/uploads/-/system/user/avatar/1254817/avatar.png . This was done in https://gitlab.com/gitlab-org/gitlab-ce/commit/2fbbba9a2958
but these types of public avatar requests to the origin have Cache-Control: private, max-age=0
, which I assume is necessary because they can be updated and we don't have them stored in a hashed path.
Other types of uploads have hashed paths however, and I believe it would be possible to utilize GITLAB_CDN_HOST
for all uploads to GitLab.com and set an aggressive cache-control header so we deliver them from the edge.
cc @DouweM for maybe some more context on avatars