Merge pull request #8244 from opf/fix/32870/dont-set-cache-headers

[32870] Don't set cache headers for own avatar
pull/8251/head
ulferts 5 years ago committed by GitHub
commit 3f7a47da15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      modules/avatars/lib/api/v3/users/user_avatar_api.rb

@ -40,7 +40,7 @@ module API
if (local_avatar = local_avatar?(@user)) if (local_avatar = local_avatar?(@user))
respond_with_attachment(local_avatar, cache_seconds: cache_seconds) respond_with_attachment(local_avatar, cache_seconds: cache_seconds)
elsif avatar_manager.gravatar_enabled? elsif avatar_manager.gravatar_enabled?
set_cache_headers!(cache_seconds) set_cache_headers!(cache_seconds) unless cache_seconds.nil?
redirect build_gravatar_image_url(@user) redirect build_gravatar_image_url(@user)
else else

Loading…
Cancel
Save