mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-29 00:00:33 -04:00
FIX: in some cases link was not followable due to click tracker
This commit is contained in:
parent
6fab03b777
commit
0bbf6354eb
1 changed files with 2 additions and 0 deletions
|
@ -56,6 +56,8 @@ class TopicLinkClick < ActiveRecord::Base
|
|||
link = TopicLink.find_by(url: url)
|
||||
return link.url if link.present?
|
||||
|
||||
return nil unless uri
|
||||
|
||||
# Only redirect to whitelisted hostnames
|
||||
return WHITELISTED_REDIRECT_HOSTNAMES.include?(uri.hostname) ? url : nil
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue