diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-10-10 15:48:19 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-10-10 15:48:19 +0300 |
commit | 36ae3bf1ca476515ba66f6e3e505cbb035534764 (patch) | |
tree | cb7f5dfafb8ac52e512237232a5a64c9ffd888cf /app/models | |
parent | b71208531a492fa5e5266dba32e0a4949b29f51f (diff) | |
parent | 75c6953fc76422b138335680b227e7303d20c136 (diff) |
Merge branch '38245-private-avatars-are-not-cdn-compatible' into 'master'
Resolve "Private Avatars are not CDN compatible"
Closes #38245 and gitlab-com/support-forum#2476
See merge request gitlab-org/gitlab-ce!14443
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/concerns/avatarable.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/avatarable.rb b/app/models/concerns/avatarable.rb index 8fbfed11bdf..2ec70203710 100644 --- a/app/models/concerns/avatarable.rb +++ b/app/models/concerns/avatarable.rb @@ -11,7 +11,7 @@ module Avatarable # If asset_host is set then it is expected that assets are handled by a standalone host. # That means we do not want to get GitLab's relative_url_root option anymore. - host = asset_host.present? ? asset_host : gitlab_host + host = (asset_host.present? && (!respond_to?(:public?) || public?)) ? asset_host : gitlab_host [host, avatar.url].join end |