diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-01-04 23:38:13 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-01-04 23:38:13 +0100 |
commit | 9c9f7dc639768a0d6b930ec11c050a1333df934e (patch) | |
tree | 7a54287bb3e8eec9a57223bdace347de72beb936 /lib/gitlab/checks/project_moved.rb | |
parent | 6fb4a533b74c861a1e533604da462efb6d309de0 (diff) | |
parent | 6f1b4dc76b4619f538b7216ad3a10ca9336d0c2b (diff) | |
download | gitlab-ce-9c9f7dc639768a0d6b930ec11c050a1333df934e.tar.gz |
Merge branch 'master' into 41249-clearing-the-cache
Diffstat (limited to 'lib/gitlab/checks/project_moved.rb')
-rw-r--r-- | lib/gitlab/checks/project_moved.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/checks/project_moved.rb b/lib/gitlab/checks/project_moved.rb index 3a1c0a3455e..dfb2f4d4054 100644 --- a/lib/gitlab/checks/project_moved.rb +++ b/lib/gitlab/checks/project_moved.rb @@ -21,6 +21,10 @@ module Gitlab end def add_redirect_message + # Don't bother with sending a redirect message for anonymous clones + # because they never see it via the `/internal/post_receive` endpoint + return unless user.present? && project.present? + Gitlab::Redis::SharedState.with do |redis| key = self.class.redirect_message_key(user.id, project.id) redis.setex(key, 5.minutes, redirect_message) |